faa6e11dd43368ea29f7aa07c2de12961b79893b
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
2
3 PR savannah/3331:
4 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
5 when we couldn't relax something.
6
7 2003-04-25 Alan Modra <amodra@bigpond.net.au>
8
9 * elflink.h (elf_merge_symbol): When we find a regular definition
10 for an indirect symbol, flip the indirection so that the old
11 direct symbol now points to the new definition.
12
13 2003-04-24 Roland McGrath <roland@redhat.com>
14
15 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
16
17 2003-04-24 Alan Modra <amodra@bigpond.net.au>
18
19 * elf32-ppc.c: Formatting and comment fixes.
20 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
21 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
22
23 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
24
25 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
26 * bfd-in2.h: Rebuilt.
27 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
28 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
29 & H8300SNMAGIC.
30 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
31 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
32 (h8300sn_info_struct, h8300hn_info_struct): New.
33 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
34 (elf32_h8_final_write_processing): Likewise.
35
36 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
37
38 * elf32-sh.c (tpoff): New.
39 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
40 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
41 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
42 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
43 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
44 (dtpoff_base): Fix wrong indentation.
45 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
46 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
47 R_SH_TLS_TPOFF32 relocations.
48
49 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
50
51 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
52 * cpu-sh.c: Likewise.
53 * elf32-sh.c: Likewise.
54 * reloc.c (bfd_reloc_code_real): Likewise.
55 * elf32-sh64-com.c: Change comment to refer to SuperH.
56 * elf32-sh64.c: Likewise.
57 * elf64-sh64.c: Likewise.
58 * bfd-in2.h (enum bfd_architecture): Regenerate.
59
60 2003-04-23 Alan Modra <amodra@bigpond.net.au>
61
62 From Julien LEMOINE <speedblue@debian.org>
63 * elf32-i386.c (elf_i386_info_to_howto): Delete.
64 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
65
66 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
67
68 * archures.c: Replace references to Mitsubishi M32R with references
69 to Renesas M32R.
70 * relocs.c: Likewise.
71 * bfd-in2.h: Regenerate.
72
73 2003-04-21 Richard Henderson <rth@redhat.com>
74
75 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
76 executable when a symbol is defined both regular and dynamic.
77
78 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
79
80 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
81 (elf32-m68hc1x.lo): Update dependencies
82 * configure.in: Add elf32-m68hc1x.lo.
83 * configure: Rebuild.
84 * Makefile.in: Rebuild.
85
86 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
87
88 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
89 (m68hc11_elf_hash_table_create): New function.
90 (elf32_m68hc11_link_hash_table_free): New function.
91 (stub_hash_newfunc): New function.
92 (m68hc11_add_stub): New function.
93 (elf32_m68hc11_add_symbol_hook): New function.
94 (elf32_m68hc11_setup_section_lists): New function.
95 (elf32_m68hc11_next_input_section): New function.
96 (elf32_m68hc11_size_stubs): New function.
97 (elf32_m68hc11_build_stubs): New function.
98 (m68hc11_get_relocation_value): New function.
99 (elf32_m68hc11_relocate_section): Call the above to redirect
100 some relocations to the trampoline code.
101 (m68hc11_elf_export_one_stub): New function.
102 (m68hc11_elf_set_symbol): New function.
103 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
104 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
105 is not yet initialized.
106
107 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
108 (elf32_m68hc11_stub_hash_entry): New struct.
109 (m68hc11_page_info): Add trampoline handler address.
110 (m68hc11_elf_link_hash_table): Add stubs generation members.
111 (elf32_m68hc11_add_symbol_hook): Declare.
112 (elf32_m68hc11_setup_section_lists): Declare.
113 (elf32_m68hc11_size_stubs): Declare.
114 (elf32_m68hc11_build_stubs): Declare.
115
116 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
117 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
118 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
119 (_bfd_m68hc11_elf_set_private_flags): Ditto.
120 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
121 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
122 (bfd_elf32_bfd_link_hash_table_create): Define.
123 (elf_backend_add_symbol_hook): Define.
124 (m68hc11_elf_bfd_link_hash_table_create): New function.
125 (m68hc11_elf_build_one_stub): New function.
126 (m68hc11_elf_size_one_stub): New function.
127 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
128 (bfd_elf32_bfd_link_hash_table_create): Define.
129
130 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
131 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
132 (m68hc12_phys_addr): Ditto.
133 (m68hc12_phys_page): Ditto.
134 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
135 (elf32_m68hc11_gc_mark_hook): Likewise.
136 (elf32_m68hc11_gc_sweep_hook): Likewise.
137 (elf32_m68hc11_check_relocs): Likewise.
138 (elf32_m68hc11_relocate_section): Likewise.
139 (_bfd_m68hc12_elf_set_private_flags): Likewise.
140 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
141 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
142 (m68hc12_elf_build_one_stub): New function.
143 (m68hc12_elf_size_one_stub): New function.
144 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
145 (elf_backend_add_symbol_hook): Define.
146 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
147
148 2003-04-18 Nick Clifton <nickc@redhat.com>
149
150 * format.c (bfd_check_format_matches): Only check associated
151 vector if the matching_vector has been created.
152
153 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
154
155 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
156 2003-04-09's change.
157
158 2003-04-15 Brian Ford <ford@vss.fsi.com>
159
160 * peicode.h (coff_swap_scnhdr_in): If a section holds
161 uninitialized data and is from an object file or from an
162 executable image that has not initialized the s_size field, or if
163 the physical size is padded, use the virtual size (stored in
164 s_paddr) instead.
165
166 2003-04-15 H.J. Lu <hjl@gnu.org>
167
168 * elflink.h (elf_link_add_object_symbols): Properly report
169 filename for alignment reduction.
170
171 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
172
173 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
174 * reloc.c: Likewise.
175 * coff-h8300.c: Likewise.
176 * coff-h8500.c: Likewise.
177 * coff-sh.c: Likewise.
178 * cpu-h8300.c: Likewise.
179 * cpu-sh.c: Likewise.
180 * elf32-h8300.c: Likewise.
181 * elf32-sh.c: Likewise.
182 * elf32-sh64-com.c: Likewise.
183 * elf32-sh64.c: Likewise.
184 * elf64-sh64.c: Likewise.
185 * bfd-in2.h: Regenerate.
186
187 2003-04-14 H.J. Lu <hjl@gnu.org>
188
189 * elflink.h (elf_link_add_object_symbols): Maintain maximum
190 alignment for common symbols. Warn reducing alignment for
191 common symbols. Report old filename when symbol size changes.
192
193 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
194
195 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
196 occurrences of the same test changed in the previous patch.
197 Optimize.
198
199 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
200
201 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
202 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
203 GOT_DISP/addend only if the symbol got a global GOT entry.
204
205 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
206
207 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
208 GOT_PAGE/GOT_OFST referencing overridable symbol to
209 GOT_DISP/addend.
210 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
211 global symbol as GOT_DISP.
212
213 2003-04-10 Bob Wilson <bob.wilson@acm.org>
214
215 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
216 next relocation on an undefined symbol.
217
218 2003-04-09 Richard Henderson <rth@redhat.com>
219
220 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
221 Ignore relocations against r_symndx == 0.
222
223 2003-04-09 H.J. Lu <hjl@gnu.org>
224
225 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
226 FALSE for undefined symbols.
227 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
228
229 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
230
231 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
232 and IRIX-specific shift-to-64-bit 4-byte lengths before following
233 addr_size.
234
235 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
236
237 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
238 pointer size from ABI, not arch_bits_per_address.
239
240 2003-04-07 Kevin Buettner <kevinb@redhat.com>
241
242 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
243 constants for n32 ABI.
244
245 2003-04-06 Andrew Cagney <cagney@redhat.com>
246
247 * simple.c (bfd_simple_get_relocated_section_contents): Disable
248 free that leads to GDB vs BFD memory corruption.
249
250 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
251
252 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
253 symbols that mark the end of the section.
254 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
255 converting to a relative branch so that the offset is computed after
256 the relaxation; also relocate a jsr into a bsr if possible but don't
257 relax them if they are to a far symbol as we need to call the
258 trampoline code.
259 (elf_m68hc11_howto_table): Set pcrel_offset to true.
260
261 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
262
263 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
264 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
265 * bfd-in2.h: Regenerate
266 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
267 * cpu-tic4x.c: Ditto
268
269 2003-04-03 Nick Clifton <nickc@redhat.com>
270
271 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
272 differently for object files and executables.
273 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
274 for object files or for executables who have not already
275 initialised the field.
276 * libpei.h (bfd_pe_executable_p): New macro. Return true if
277 the PE format bfd is an executable.
278
279 2003-04-03 Alan Modra <amodra@bigpond.net.au>
280
281 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
282 here as it's too early to reliably determine locality.
283 (ppc_elf_gc_sweep_hook): Likewise.
284 (SYMBOL_REFERENCES_LOCAL): Expand comment.
285
286 2003-04-02 Bob Wilson <bob.wilson@acm.org>
287
288 * xtensa-modules.c: Remove comment indicating that this is a
289 generated file.
290
291 2003-04-02 Alan Modra <amodra@bigpond.net.au>
292
293 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
294
295 2003-04-01 Bob Wilson <bob.wilson@acm.org>
296
297 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
298 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
299 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
300 xtensa-modules.lo.
301 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
302 xtensa-modules.c.
303 (cpu-xtensa.lo): New target.
304 (elf32-xtensa.lo): Likewise.
305 (xtensa-isa.lo): Likewise.
306 (xtensa-modules.lo): Likewise.
307 * Makefile.in: Regenerate.
308 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
309 (bfd_archures_list): Add bfd_xtensa_arch.
310 * config.bfd: Handle xtensa-*-*.
311 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
312 * configure: Regenerate.
313 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
314 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
315 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
316 (bfd_elf32_xtensa_le_vec): Likewise.
317 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
318 * cpu-xtensa.c: New file.
319 * elf32-xtensa.c: Likewise.
320 * xtensa-isa.c: Likewise.
321 * xtensa-modules.c: Likewise.
322 * libbfd.h: Regenerate.
323 * bfd-in2.h: Likewise.
324
325 2003-04-01 Nick Clifton <nickc@redhat.com>
326
327 * archures.c (bfd_mach_arm_unknown): Define.
328 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
329 bfd_arm_get_mach_from_notes): Prototype.
330 * bfd-in2.h: Regenerate.
331 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
332 bfd_arm_merge_machines.
333 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
334 * coffcode.h (coff_set_arch_mach_hook): Call
335 bfd_arm_get_mach_from_notes.
336 * coffgen.c (coff_real_object_p): Revert previous delta.
337 * cpu_arm.c (arm_check_note): New function. Examine a note in a
338 .note section.
339 (bfd_arm_merge_machines): New function: Handle the merging of ARM
340 binaries compiled for different architectures..
341 (bfd_arm_update_notes): New function: Update an ARM note section.
342 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
343 number from an ARM note section.
344 * elf32-arm.h (elf32_arm_object_p): Use
345 bfd_arm_get_mach_from_notes.
346 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
347 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
348
349 2003-04-01 Ben Elliston <bje@wasabisystems.com>
350
351 * dwarf2.c (read_attribute_value): Correct typo in comment.
352
353 2003-04-01 Nick Clifton <nickc@redhat.com>
354
355 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
356 instead of concat().
357 (decode_line_info): Only free filename if it is not NULL.
358 (add_line_info): Make a copy of the filename when storing it into
359 the info structure.
360
361 2003-03-31 Andreas Schwab <schwab@suse.de>
362 Daniel Jacobowitz <drow@mvista.com>
363
364 * simple.c (bfd_simple_get_relocated_section_contents): Add
365 parameter symbol_table. Optionally use it instead of the symbol
366 table from the bfd. Save and restore output offsets and output
367 sections around bfd_get_relocated_section_contents. Fix a memory
368 leak.
369 (simple_save_output_info, simple_restore_output_info): New
370 functions.
371 * bfd-in2.h: Regenerate.
372 * dwarf2.c (read_abbrevs): Use
373 bfd_simple_get_relocated_section_contents instead of
374 bfd_get_section_contents.
375 (decode_line_info): Likewise.
376 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
377 find_rela_addend.
378 (find_rela_addend): Remove.
379 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
380 debugging sections.
381 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
382 not bfd_zalloc.
383
384 2003-03-31 David Heine <dlheine@suif.stanford.edu>
385
386 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
387 bfd_alloc.
388 * dwarf2.c (concat_filename): Always allocate space for the
389 returned filename.
390 (decode_line_info): Free the allocated filename returned by
391 concat_filename.
392 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
393 * elf.c (copy_private_bfd_data): Likewise.
394 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
395 * elflink.h (elf_link_sort_relocs): Fix memory leak.
396 * format.c (bfd_check_format_matches): Likewise.
397 * linker.c (bfd_generic_final_link): Likewise.
398 * opncls.c (find_separate_debug_info): Likewise.
399 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
400
401 2003-03-28 H.J. Lu <hjl@gnu.org>
402
403 * elflink.h (elf_link_add_object_symbols): Correctly combine
404 visibilities.
405
406 2003-03-27 Jakub Jelinek <jakub@redhat.com>
407
408 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
409 to -1 before recomputing got offsets.
410
411 2003-03-26 Andreas Schwab <schwab@suse.de>
412
413 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
414 (elf_m68k_relocate_section): Use it to correctly handle symbols
415 forced to be local.
416 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
417 entries for symbols that are forced to be local.
418
419 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
420
421 * elfxx-mips.c (_bfd_mips_relax_section): New function.
422 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
423 * elfn32-mips.c, elf64-mips.c: Use it.
424
425 2003-03-25 Stan Cox <scox@redhat.com>
426 Nick Clifton <nickc@redhat.com>
427
428 Contribute support for Intel's iWMMXt chip - an ARM variant:
429
430 * archures.c: Add bfd_mach_arm_iWMMXt.
431 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
432 * bfd-in2.h: Regenerate.
433 * libbfd.h: Regenerate.
434 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
435 object files to be linked with XScale ones.
436 (coff_arm_final_link_postscript): Update note section.
437 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
438 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
439 after identifying a coff binary.
440 * cpu-arm.c (processors): Add iWMMXt.
441 (arch_inf): Likewise.
442 * elf32-arm.h (arm_object_p): Handle note section.
443 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
444 be linked with XScale ones.
445 (elf32_arm_section_flags): New function: Set flags on note section.
446 (elf32_arm_final_write_processing): Handle note section.
447
448 2003-03-21 DJ Delorie <dj@redhat.com>
449
450 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
451 _bfd_elf_rela_local_sym.
452
453 2003-03-20 H.J. Lu <hjl@gnu.org>
454
455 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
456 non-ELF outputs.
457
458 2003-03-20 Nick Clifton <nickc@redhat.com>
459
460 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
461 $idata5 in case bfd_coff_final_link is not called.
462
463 2003-03-19 Jakub Jelinek <jakub@redhat.com>
464
465 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
466 field.
467 (canon_reloc_count): Define.
468 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
469 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
470 reloc_count.
471 (sparc64_elf_canonicalize_reloc): New routine.
472 (bfd_elf64_canonicalize_reloc): Define.
473
474 2003-03-18 Jakub Jelinek <jakub@redhat.com>
475
476 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
477 againt mergeable sections. Take r_addend into account when caching
478 trampolines.
479
480 2003-03-18 Richard Henderson <rth@redhat.com>
481
482 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
483 local symbols that have no dyninfo.
484
485 2003-03-14 Gene Smith <gene.smith@siemens.com>
486
487 * ieee.c (ieee_write_expression): Handle the case where symbol is
488 NULL.
489 General formatting improvements.
490
491 2003-03-13 Nick Clifton <nickc@redhat.com>
492
493 * configure.in (LINGUAS): Add zh_CN.
494 * configure: Regenerate.
495 * po/zh_CN.po: New file.
496
497 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
498
499 * aout-cris.c (BYTES_IN_WORD): Don't define.
500 aout-encap.c: Likewise.
501 aout-ns32k.c: Likewise.
502 aout-tic30.c: Likewise.
503 hp300bsd.c: Likewise.
504 i386aout.c: Likewise.
505 i386dynix.c: Likewise.
506 i386linux.c: Likewise.
507 i386lynx.c: Likewise.
508 i386mach3.c: Likewise.
509 m68k4knetbsd.c: Likewise.
510 m68klinux.c: Likewise.
511 m68klynx.c: Likewise.
512 m68knetbsd.c: Likewise.
513 m88kmach3.c: Likewise.
514 mipsbsd.c: Likewise.
515 newsos3.c: Likewise.
516 sparclinux.c: Likewise.
517 sparclynx.c: Likewise.
518 sparcnetbsd.c: Likewise.
519 vaxbsd.c: Likewise. Fix comment formatting.
520
521 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
522
523 * Reverted 2003-03-02's patch.
524
525 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
526 overridable.
527 * elf64-mips.c (mips_elf64_canonicalize_reloc,
528 mips_elf64_get_dynamic_reloc_upper_bound,
529 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
530 (bfd_elf64_get_canonicalize_reloc,
531 bfd_elf64_get_dynamic_reloc_upper_bound,
532 bfd_elf64_canonicalize_dynamic_reloc): Define.
533 (mips_elf64_slurp_reloc_table): Support dynamic.
534 (mips_elf64_slurp_one_reloc_table): Adjust.
535
536 2003-03-12 Nick Clifton <nickc@redhat.com>
537
538 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
539 'index' to 'offset' in test for zero value.
540
541 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
542
543 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
544 dynamic relocations pointing to local or section symbols, use the
545 NULL symbol instead. Document the choice to not emit an
546 additional R_MIPS_64 relocation.
547
548 2003-03-11 Alan Modra <amodra@bigpond.net.au>
549
550 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
551 zero index dynamic tls relocs generated for the GOT. Tidy code.
552 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
553 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
554
555 2003-03-07 Alan Modra <amodra@bigpond.net.au>
556
557 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
558 a tls_get_addr call.
559
560 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
561 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
562 ELF_LINK_NON_GOT_REF from weakdef.
563 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
564 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
565 ELF_LINK_NON_GOT_REF from weakdef.
566 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
567 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
568 ELF_LINK_NON_GOT_REF from weakdef.
569
570 2003-03-06 Jakub Jelinek <jakub@redhat.com>
571 Andrew Haley <aph@redhat.com>
572
573 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
574 output is relocateable.
575
576 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
577
578 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
579 R_COMMENT.
580
581 2003-03-06 Alan Modra <amodra@bigpond.net.au>
582
583 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
584 error messages.
585 (ELIMINATE_COPY_RELOCS): Define to zero.
586 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
587 TLSLD relocs. Report reloc types on a number of errors. Optimize
588 LOCAL24PC check for non-local syms. Don't capitalize error messages.
589 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
590 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
591 calculating TLSLD relocs. Report reloc types on a number of errors.
592 Don't capitalize error messages.
593
594 2003-03-03 H.J. Lu <hjl@gnu.org>
595
596 * elfxx-ia64.c (USE_BRL): Removed.
597 (oor_ip): Removed.
598
599 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
600
601 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
602 relocation (no special function), and make it non-partial_inplace.
603 (sh_elf_relax_section): When creating a bsr, use a consistent value
604 no matter if the symbol is extern or not; set addend to -4.
605 Don't swap load / non-load instructions for SH4.
606 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
607 rather than if the symbol is external to determine if adjusting the
608 offset makes sense. Adjust the addend too if appropriate.
609 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
610 relocation.
611
612 2003-03-03 Nick Clifton <nickc@redhat.com>
613
614 * po/da.po: Installed latest translation.
615
616 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
617
618 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
619 R_MIPS_PC16 to rightshift 2.
620 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
621 (bfd_elf32_bfd_reloc_type_lookup): Support
622 BFD_RELOC_MIPSEMB_16_PCREL_S2.
623 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
624 R_MIPS_PC16 to rightshift 2.
625 (mips_elf64_howto_table_rela): Likewise.
626 (mips_reloc_map): Map to rightshifted BFD reloc.
627 * elfn32-mips.c: The same as in elf64-mips.c.
628 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
629 (mips_elf_calculate_relocation): Handle rightshifted addends for
630 R_MIPS_PC16.
631 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
632 MIPS Embedded PIC. Remove superfluous empty COMMENT.
633 * libbfd.h: Regenerate.
634 * bfd-in2.h: Regenerate.
635
636 2003-02-28 Richard Henderson <rth@redhat.com>
637
638 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
639 for ltoff22x relaxation.
640
641 2003-03-01 Alan Modra <amodra@bigpond.net.au>
642
643 * bfd-in.h (_bfd): Don't define.
644 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
645 * syms.c: Likewise.
646 * bfd-in2.h: Regenerate.
647
648 2003-02-27 Richard Henderson <rth@redhat.com>
649
650 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
651 (elfNN_ia64_check_relocs): Set it.
652 (allocate_global_data_got): Check it.
653 (allocate_local_got): Likewise.
654 (allocate_dynrel_entries): Likewise.
655 (elfNN_ia64_relax_ldxmov): New.
656 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
657 (elfNN_ia64_choose_gp): Split out from ...
658 (elfNN_ia64_final_link): ... here.
659
660 2003-02-27 Andrew Cagney <cagney@redhat.com>
661
662 * bfd.c (struct bfd): Rename "struct _bfd".
663 * bfd-in.h: Update copyright.
664 (struct bfd): Rename "struct _bfd".
665 (_bfd): Define for backward compatibility.
666 * bfd-in2.h: Regenerate.
667
668 2003-02-25 Alan Modra <amodra@bigpond.net.au>
669
670 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
671 and rel_hdr2 when initially counting input relocs rather than after
672 creating output reloc sections.
673 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
674 sizes.
675
676 * Makefile.am: Run "make dep-am".
677 * Makefile.in: Regenerate.
678
679 2003-02-24 Kris Warkentin <kewarken@qnx.com>
680
681 * elf.c (elfcore_read_notes): Add check for QNX style core file.
682 (elfcore_grog_nto_note): New function.
683 (elfcore_grog_nto_gregs): New function.
684 (elfcore_grog_nto_status): New function.
685
686 2003-02-24 Alan Modra <amodra@bigpond.net.au>
687
688 * elflink.c (_bfd_elf_create_got_section): Check existing .got
689 section flags before concluding that we've already been called.
690 Don't use register keyword.
691 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
692 (_bfd_elf_create_linker_section): Formatting.
693
694 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
695
696 * coff-h8300.c: Fix typo: intial -> initial.
697 * coff-ppc.c: Likewise.
698
699 2003-02-20 Alan Modra <amodra@bigpond.net.au>
700
701 * elf32-ppc.c: Formatting.
702 (allocate_dynrelocs): LD and GD relocs against the same sym need
703 separate GOT entries.
704 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
705 entries per symbol.
706
707 2003-02-19 Alan Modra <amodra@bigpond.net.au>
708
709 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
710 removal. Localize vars. Remove unnecessary dynobj test.
711 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
712 of INFO.
713 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
714 and optimize.
715 (elf_i386_relocate_section): Likewise.
716 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
717 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
718 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
719 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
720 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
721 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
722 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
723 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
724 Formatting.
725
726 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
727 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
728 test.
729 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
730 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
731 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
732 and optimize. Use ELIMINATE_COPY_RELOCS.
733 (ppc64_elf_relocate_section): Likewise.
734
735 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
736 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
737 (ELIMINATE_COPY_RELOCS): Define.
738 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
739 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
740 (MUST_BE_DYN_RELOC): Define.
741 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
742 and optimize. Trim dyn_relocs.
743 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
744 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
745 track of pc_rel dyn relocs.
746 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
747 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
748 allocate_dynrelocs. Don't recalculate "sec".
749
750 2003-02-18 Alan Modra <amodra@bigpond.net.au>
751
752 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
753 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
754 on invalid LD relocs.
755 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
756 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
757 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
758
759 * elf32-ppc.h: New file.
760 * elf32-ppc.c: Include elf32-ppc.h.
761 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
762 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
763 Add "tls_mask" field.
764 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
765 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
766 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
767 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
768 Make use of htab shortcuts throughout file.
769 (ppc_elf_link_hash_newfunc): Init tls_mask field.
770 (ppc_elf_link_hash_table_create): Init new fields.
771 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
772 (ppc_elf_howto_raw): Add tls relocs.
773 (ppc_elf_reloc_type_lookup): Handle them.
774 (ppc_elf_unhandled_reloc): New function.
775 (ppc_elf_create_got): Stash got section pointer in hash table,
776 return status. Make .rela.got too.
777 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
778 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
779 NON_GOT_REF set. Don't allocate space in .plt here..
780 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
781 not allocating plt entries unnecessarily. Allocate got entries here.
782 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
783 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
784 "info" during allocate_dynrelocs hash traversal. Use htab section
785 shortcuts rather than searching for named sections. Get rid of
786 "plt" and "strip" booleans.
787 (update_local_sym_info, bad_shared_reloc): New functions.
788 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
789 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
790 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
791 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
792 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
793 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
794 relocs that might use a plt entry. Set NON_GOT_REF too.
795 Enumerate all do-nothing relocs.
796 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
797 tls relocs and all plt relocs.
798 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
799 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
800 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
801 shortcuts.
802 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
803 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
804 entries and got relocs here. Warn on non-zero got reloc addend.
805 Split out branch taken/not taken reloc code into a separate switch
806 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
807 Split out HA reloc adjustments to separate switch statement. Don't
808 warn on reloc overflow if we've already warned about undefined.
809 Don't rebuild sym name when reporting errors. Report all possible
810 errors from _bfd_final_link_relocate.
811 (bfd_elf32_bfd_final_link): Don't define.
812
813 2003-02-18 Alan Modra <amodra@bigpond.net.au>
814
815 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
816 rebuild sym name when reporting errors.
817
818 2003-02-17 Nick Clifton <nickc@redhat.com>
819
820 * elflink.h (elf_link_output_extsym): Only check
821 allow_shlib_undefined for shared libraries.
822 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
823 of allow_shlib_undefined.
824 * elf32-cris.c (cris_elf_relocate_section): Likewise.
825 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
826 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
827 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
828 * elf32-s390.c (elf_s390_relocate_section): Likewise.
829 * elf32-sh.c (sh_elf_relocate_section): Likewise.
830 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
831 * elf32-vax.c (elf_vax_relocate_section): Likewise.
832 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
833 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
834 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
835 * elf64-s390.c (elf_s390_relocate_section): Likewise.
836 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
837 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
838 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
839 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
840
841 2003-02-17 Nick Clifton <nickc@redhat.com>
842
843 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
844 address field to use in the comparison.
845 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
846
847 2003-02-14 Bob Wilson <bob.wilson@acm.org>
848
849 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
850 backends when checking if the generic ELF target should be used.
851
852 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
853 outside of functions, treat values as absolute addresses.
854
855 * bfd.c: Change embedded documentation to use consistent indentation
856 and to split up long lines. Change informal style of description
857 for functions lacking real documentation.
858 * coffcode.h: Break up long lines in embedded documentation.
859 * format.c: Likewise.
860 * targets.c: Likewise.
861 * libcoff.h: Regenerate.
862 * bfd-in2.h: Regenerate.
863
864 2003-02-14 Alan Modra <amodra@bigpond.net.au>
865
866 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
867 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
868 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
869 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
870 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
871 (group_sections): Don't share a stub section if stubs are for a large
872 section. Adjust comment.
873 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
874 !stubs_always_before_branch.
875 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
876 treat undefined and undefweak specially when processing dyn relocs.
877
878 2003-02-13 Jakub Jelinek <jakub@redhat.com>
879
880 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
881
882 2003-02-13 Nick Clifton <nickc@redhat.com>
883
884 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
885 in computation of offset to insert into BL instruction.
886
887 2003-02-11 Uwe Stieber <uwe@wwws.de>
888
889 * config.bfd: Add support for kaOS as cross build target system.
890
891 2003-02-11 Alan Modra <amodra@bigpond.net.au>
892
893 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
894 .__tls_get_addr too.
895 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
896
897 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
898
899 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
900 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
901 (sh_elf_link_hash_newfunc): Remove the initialization of
902 tls_tpoff32 field.
903 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
904 for which tls_tpoff32 flag is set.
905 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
906 of the symbol includes the entry matched with the input_section
907 and having tls_tpoff32 flag on. When linking statically, set
908 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
909 is defined in this executable.
910 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
911
912 2003-02-10 Jakub Jelinek <jakub@redhat.com>
913
914 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
915 even if there is just non-empty .rela.plt.
916
917 2003-02-10 Nick Clifton <nickc@redhat.com>
918
919 * archures.c (bfd_mach_arm_ep9312): Define.
920 * bfd-in2.h: Regenerate.
921 * cpu-arm.c (processors[]): Add ep9312.
922 (bfd_arm_arch): Add ep9312.
923 * elf32-arm.h (elf32_arm_merge_private_data): Update error
924 messages and add test for Maverick floating point support.
925 (elf32_arm_print_private_bfd_data): Handle
926 EF_ARM_MAVERICK_FLOAT flag.
927 (elf32_arm_object_p): New function.
928 (elf_backend_object_p): Define.
929
930 2003-02-10 Alan Modra <amodra@bigpond.net.au>
931
932 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
933 variables, structure fields or function params to tls_mask or
934 similar to better reflect usage.
935 (struct got_entry): Comment.
936 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
937 (get_tls_mask): Rename from get_tls_type.
938
939 2003-02-09 Alan Modra <amodra@bigpond.net.au>
940
941 * elf64-ppc.c (TLS_GD_LD): Don't define..
942 (TLS_GD): ..define this instead and update all uses.
943 (TLS_TPRELGD): Define.
944 (ppc64_elf_link_hash_table_create): Tweak initialization of
945 init_refcount and init_offset.
946 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
947 Mark second slot of GD or LD toc entries.
948 (get_tls_type): Return an int. Distinguish toc GD and LD entries
949 from other tls types.
950 (ppc64_elf_tls_setup): New function, split out from..
951 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
952 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
953 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
954 return value to properly decide whether toc GD and LD entries can
955 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
956 to determine GD or LD rather than looking at TLS_LD flag. Don't
957 attempt to adjust got entry tls_type here..
958 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
959 look for possible merges.
960 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
961 optimization.
962 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
963 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
964 Make use of return value from get_tls_type to properly detect GD and
965 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
966 handle tls_get_addr removal when looking at REL24 relocs, do it when
967 looking at the previous reloc. Check reloc after DTPMOD64 to determine
968 GD or LD.
969 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
970
971 2003-02-08 Alan Modra <amodra@bigpond.net.au>
972
973 * elf32-hppa.c (group_sections): Don't share a stub section if
974 stubs are for a large section.
975
976 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
977 stubs if !stubs_always_before_branch.
978
979 2003-02-07 Nick Clifton <nickc@redhat.com>
980
981 * elf.c (swap_out_syms): Generate an error message if an
982 equivalent output section cannot be found for a symbol.
983
984 2003-02-07 Jakub Jelinek <jakub@redhat.com>
985
986 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
987 local_got_entries is NULL.
988
989 2003-02-06 Andreas Schwab <schwab@suse.de>
990
991 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
992 (read_value): Add parameter is_signed, use signed extraction if
993 the value is signed.
994 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
995 encoding to read_value.
996
997 2003-02-06 Alan Modra <amodra@bigpond.net.au>
998
999 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
1000 plt info when called to transfer weak sym info.
1001
1002 2003-02-05 Alan Modra <amodra@bigpond.net.au>
1003
1004 * reloc.c: Add PPC and PPC64 TLS relocs.
1005 * libbfd.h: Regenerate.
1006 * bfd-in2.h: Regenerate.
1007 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
1008 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
1009 against a 32 bit field.
1010 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
1011 (_ppc64_elf_section_data): Add t_symndx and comments.
1012 (ppc64_elf_section_data): Use elf_section_data macro.
1013 (ppc64_elf_new_section_hook): American spelling.
1014 (struct got_entry, struct plt_entry): New.
1015 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
1016 (struct ppc_stub_hash_entry): Add "addend" field.
1017 (struct ppc_link_hash_entry): Add "tls_type".
1018 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1019 TLS_EXPLICIT): Define.
1020 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
1021 (link_hash_newfunc): Init new fields.
1022 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
1023 init_offset to NULL.
1024 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
1025 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
1026 there.
1027 (update_local_sym_info, update_plt_info): New functions.
1028 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
1029 handling to use got.glist rather than got.refcount. Likewise for PLT.
1030 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
1031 (func_desc_adjust): Adjust for new PLT list.
1032 (ppc64_elf_adjust_dynamic_symbol): Likewise.
1033 (get_sym_h, get_tls_type): New functions.
1034 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
1035 (ppc64_elf_tls_optimize): New function.
1036 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
1037 TLS relocs.
1038 (ppc64_elf_size_dynamic_sections): Likewise.
1039 (ppc_type_of_stub): Adjust for new PLT list.
1040 (ppc_build_one_stub): Likewise.
1041 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
1042 calls specially.
1043 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
1044 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
1045 init GOT entries that have a reloc. Generate GOT relocs here..
1046 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
1047 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
1048
1049 2003-02-04 Andreas Schwab <schwab@suse.de>
1050
1051 * elf32-m68k.c (elf_m68k_hash_entry): Define.
1052 (elf_m68k_link_hash_traverse): Remove.
1053 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
1054 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
1055 reduce casting.
1056 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
1057 casting.
1058 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
1059 instead of elf_m68k_link_hash_traverse.
1060 (elf_m68k_discard_copies): Change first parameter to pointer to
1061 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
1062 elf_m68k_link_hash_entry is needed.
1063
1064 2003-02-04 Alan Modra <amodra@bigpond.net.au>
1065
1066 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
1067 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
1068 "got" union, and declare as gotplt_union. Use gotplt_uinion for
1069 "plt" field.
1070 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
1071 Add "init_offset" field.
1072 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
1073 (elf_local_got_ents): Declare.
1074 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
1075 and "plt".
1076 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
1077 (_bfd_elf_link_hash_table_init): Set "init_offset".
1078 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
1079 from init_offset.
1080 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
1081
1082 * elf.c (bfd_elf_local_sym_name): Split out from..
1083 (group_signature): ..here.
1084 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
1085
1086 2003-02-04 Alan Modra <amodra@bigpond.net.au>
1087
1088 * elf-bfd.h (enum elf_link_info_type): Remove.
1089 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
1090 to struct sec. Remove linkonce_p field.
1091 (elf_linkonce_p): Delete.
1092 (elf_discarded_section): Update for sec_info_type change.
1093 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
1094 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
1095 (ELF_INFO_TYPE_NONE): Define.
1096 (ELF_INFO_TYPE_STABS): Define.
1097 (ELF_INFO_TYPE_MERGE): Define.
1098 (ELF_INFO_TYPE_EH_FRAME): Define.
1099 (ELF_INFO_TYPE_JUST_SYMS): Define.
1100 (STD_SECTION): Update struct sec initializer.
1101 * ecoff.c (bfd_debug_section): Likewise.
1102 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
1103 * elflink.h: Likewise.
1104 * elf-eh-frame.c: Likewise.
1105 * elf64-alpha.c: Likewise.
1106 * elfxx-ia64.c: Likewise.
1107 * elfxx-mips.c: Likewise.
1108 * bfd-in2.h: Regenerate.
1109
1110 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
1111 referring to used_by_bfd.
1112 * elf64-sparc.c (sec_do_relax): Likewise.
1113 * elf64-mmix.c (mmix_elf_section_data): Likewise.
1114 * elfxx-mips.c (mips_elf_section_data): Likewise.
1115 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
1116 (ieee_get_section_contents): Likewise.
1117 (ieee_new_section_hook): Formatting.
1118 (ieee_canonicalize_reloc): Remove commented out code.
1119 * mmo.c (mmo_section_data): Define. Use throughout file.
1120 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
1121
1122 2003-01-31 Graydon Hoare <graydon@redhat.com>
1123
1124 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
1125 * Makefile.in: Regenerate.
1126 * opncls.c (calc_crc32, get_debug_link_info,
1127 seperate_debug_file_exists, find_seperate_debug_file): New
1128 internal functions.
1129 (bfd_follow_gnu_debuglink): New function. Follow the pointer
1130 contained inside a .gnu_debuglink section.
1131 * bfd-in2.h: Regenerate.
1132
1133 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
1134
1135 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
1136 entry->abfd when it's NULL.
1137
1138 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
1139
1140 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
1141 _bfd_elf_section_offset returning -2 the same way as -1.
1142
1143 * elfxx-mips.c (mips_elf_multi_got): New function.
1144 (struct mips_got_entry): Make symndx and gotidx signed. Moved
1145 addend into union along with address and link hash entry.
1146 (struct mips_got_info): Added bfd2got and next.
1147 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
1148 (mips_elf_got_section, mips_elf_create_got_section): Use
1149 SEC_EXCLUDE bit to tell whether we really need the got
1150 section. Take boolean arguments to disregard an excluded
1151 section, or to create it as excluded. Adjust all callers.
1152 Use mips_elf_got_section all over.
1153 (mips_elf_local_got_index, mips_elf_got_page,
1154 mips_elf_got16_entry): Take input bfd as argument, and pass it
1155 on to mips_elf_create_local_got_entry.
1156 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
1157 Take input bfd as argument, and manage entries in the
1158 appropriate GOT.
1159 (mips_elf_got_offset_from_index): Take input bfd as argument,
1160 and use it to adjust the GP offset of the bfd.
1161 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
1162 unreferenced GOT entries of global symbols to the end.
1163 (mips_elf_record_global_got_symbol): Take input bfd as
1164 argument. Add entries to the master GOT hash table.
1165 (struct mips_elf_bfd2got_hash): New.
1166 (struct mips_elf_got_per_bfd_arg): New.
1167 (struct mips_elf_set_global_got_offset_arg): New.
1168 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
1169 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
1170 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
1171 mips_elf_merge_gots, mips_elf_set_global_got_offset,
1172 mips_elf_resolve_final_got_entry,
1173 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
1174 mips_elf_got_for_ibfd): New functions.
1175 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
1176 (MIPS_ELF_GOT_MAX_SIZE): New macro.
1177 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
1178 (mips_elf_got_entry_hash): Take new fields into account. Use
1179 mips_elf_hash_bfd_vma.
1180 (mips_elf_got_entry_eq): Take new fields into account.
1181 (mips_elf_create_got_section): Initialize new fields.
1182 (mips_elf_calculate_relocation): Pass input_bfd to functions
1183 that now take it. Adjust gp for the input_bfd.
1184 (mips_elf_allocate_dynamic_relocation,
1185 mips_elf_create_dynamic_relocation,
1186 _bfd_mips_elf_create_dynamic_sections): Use...
1187 (mips_elf_rel_dyn_section): New function. Borrow code from...
1188 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
1189 now take it. Create the got section if needed, even if
1190 excluded, before recording a global got symbol. Move some
1191 code to...
1192 (mips_elf_record_local_got_symbol): New fn.
1193 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
1194 Compute multi-got global entries offsets. Move GOT code to...
1195 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
1196 if the GOT is too big.
1197 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
1198 undefweak symbol to zero. Generate dynamic relocations for
1199 non-primary GOT entries for global symbols.
1200 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
1201 case. Generate dynamic relocations for local got entries.
1202 Sort dynamic relocations on N64 too, using...
1203 (sort_dynamic_relocs_64): New fns.
1204 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
1205 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
1206
1207 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
1208
1209 * bfd.c (struct _bfd): Added id field.
1210 * opncls.c (_bfd_id_counter): New static variable.
1211 (_bfd_new_bfd): Use it.
1212 * bfd-in2.h: Rebuilt.
1213
1214 2003-01-25 Alan Modra <amodra@bigpond.net.au>
1215
1216 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
1217
1218 2003-01-25 Jakub Jelinek <jakub@redhat.com>
1219
1220 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
1221 (elf32_sparc_rev32_howto): New variable.
1222 (sparc_reloc_map): Add TLS relocs.
1223 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
1224 Handle REV32.
1225 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
1226 New functions.
1227 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
1228 struct elf32_sparc_link_hash_table):
1229 New structures.
1230 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
1231 elf32_sparc_hash_table): Define.
1232 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
1233 create_got_section, elf32_sparc_create_dynamic_sections,
1234 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
1235 functions.
1236 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
1237 reference counting.
1238 (elf32_sparc_gc_sweep_hook): Likewise.
1239 (elf32_sparc_adjust_dynamic_symbol): Likewise.
1240 (elf32_sparc_size_dynamic_sections): Likewise.
1241 (elf32_sparc_relocate_section): Likewise.
1242 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
1243 New functions.
1244 (elf32_sparc_object_p): Allocate backend private object data.
1245 (bfd_elf32_bfd_link_hash_table_create,
1246 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
1247 elf_backend_can_refcount): Define.
1248 (elf_backend_create_dynamic_sections): Define to
1249 elf32_sparc_create_dynamic_sections.
1250 * reloc.c: Add SPARC TLS relocs.
1251 * bfd-in2.h, libbfd.h: Rebuilt.
1252 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
1253 (sparc_reloc_map): Likewise.
1254
1255 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
1256
1257 * bfd-in2.h: Regenerate.
1258 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
1259 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
1260 (elf_howto_table): Add TLS relocs.
1261 (elf_s390_reloc_type_lookup): Likewise.
1262 (elf_s390_link_hash_entry): Add tls_type.
1263 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
1264 New macros.
1265 (elf_s390_link_hash_table): Add tls_ldm_got.
1266 (link_hash_newfunc): Initialize tls_type.
1267 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
1268 (elf_s390_copy_indirect_symbol): Copy tls_type information.
1269 (elf_s390_check_relocs): Support TLS relocs.
1270 (elf_s390_gc_sweep_hook): Likewise.
1271 (allocate_dynrelocs): Likewise.
1272 (elf_s390_size_dynamic_sections): Likewise.
1273 (elf_s390_relocate_section): Likewise.
1274 (elf_s390_finish_dynamic_symbol): Likewise.
1275 (bfd_elf32_mkobject): Define for TLS.
1276 * elf64-s390.c: Same changes as for elf32-s390.c.
1277 * libbfd.h: Regenerate.
1278 * reloc.c: Add s390 TLS relocations.
1279
1280 2003-01-24 Charles Lepple clepple.ghz.cc
1281
1282 * aclocal.m4: Fix name of --enable-install-libbfd switch.
1283
1284 2003-01-23 Nick Clifton <nickc@redhat.com>
1285
1286 * Add sh2e support:
1287
1288 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
1289
1290 * archures.c (bfd_mach_sh2e): Added.
1291 * bfd-in2.h: Rebuilt.
1292 * cpu-sh.c (arch_info_struct): Added SH2e.
1293 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
1294
1295 2003-01-23 Alan Modra <amodra@bigpond.net.au>
1296
1297 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
1298 dynindx to an int. Rearrange for better packing.
1299 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
1300 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
1301 * elf32-sh64.h: New. Split out from include/elf/sh.h.
1302 (struct _sh64_elf_section_data): New struct.
1303 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
1304 * elf32-sh64-com.c: Include elf32-sh64.h.
1305 * elf32-sh64.c: Likewise.
1306 (sh64_elf_new_section_hook): New function.
1307 (bfd_elf32_new_section_hook): Define.
1308 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
1309 (sh64_bfd_elf_copy_private_section_data): Likewise.
1310 (sh64_elf_final_write_processing): Likewise.
1311 * elf32-sparc.c (struct elf32_sparc_section_data): New.
1312 (elf32_sparc_new_section_hook): New function.
1313 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
1314 (sec_do_relax): Define.
1315 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
1316 (elf32_sparc_relocate_section): Likewise.
1317 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
1318 * elf64-mmix.c (struct _mmix_elf_section_data): New.
1319 (mmix_elf_section_data): Define. Use throughout file.
1320 (mmix_elf_new_section_hook): New function.
1321 (bfd_elf64_new_section_hook): Define.
1322 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
1323 (ppc64_elf_section_data): Define. Use throughout.
1324 (ppc64_elf_new_section_hook): New function.
1325 (bfd_elf64_new_section_hook): Define.
1326 * elf64-sparc.c (struct sparc64_elf_section_data): New.
1327 (sparc64_elf_new_section_hook): New function.
1328 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
1329 (sec_do_relax): Define.
1330 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
1331 (sparc64_elf_relocate_section): Likewise.
1332 (bfd_elf64_new_section_hook): Define.
1333 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
1334 * elfxx-mips.c (struct _mips_elf_section_data): New.
1335 (mips_elf_section_data): Define. Use throughout.
1336 (_bfd_mips_elf_new_section_hook): New function.
1337 (mips_elf_create_got_section): Don't alloc used_by_bfd.
1338 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
1339 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
1340 * Makefile.am: Run "make dep-am".
1341 * Makefile.in: Regenerate.
1342
1343 2003-01-21 Richard Henderson <rth@redhat.com>
1344
1345 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
1346 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
1347 (elf64_alpha_adjust_dynamic_symbol): Set them.
1348 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
1349 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
1350 symbol index when relaxing LDM to TPREL.
1351 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
1352 relocs, even if the target isn't locally defined.
1353 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
1354 (elf64_alpha_relocate_section): Likewise. Force TP-relative
1355 relocs vs symndx 0 to the tp base.
1356
1357 2003-01-21 Fabio Alemagna <falemagn@aros.org>
1358
1359 * config.bfd: Handle i[3456]86-*-aros*.
1360
1361 2003-01-21 Andreas Schwab <schwab@suse.de>
1362
1363 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
1364 (struct ppc_elf_link_hash_entry): Define.
1365 (ppc_elf_hash_entry): New function.
1366 (struct ppc_elf_link_hash_table): Define.
1367 (ppc_elf_hash_table): New function.
1368 (ppc_elf_link_hash_newfunc): New function.
1369 (ppc_elf_link_hash_table_create): New function.
1370 (ppc_elf_copy_indirect_symbol): New function.
1371 (allocate_dynrelocs): New function.
1372 (readonly_dynrelocs): New function.
1373 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
1374 relocs and determine DT_TEXTREL.
1375 (ppc_elf_check_relocs): Don't do that here, just count the
1376 dynamic relocs.
1377 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
1378 removed section.
1379 (bfd_elf32_bfd_link_hash_table_create): Define.
1380 (elf_backend_copy_indirect_symbol): Define.
1381
1382 2003-01-21 Richard Henderson <rth@redhat.com>
1383
1384 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
1385 TPREL also get a reloc if shared. Remove SREL support.
1386 (elf64_alpha_emit_dynrel): New.
1387 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
1388 and GOTTPREL relocs to local symbols against the tp base.
1389 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
1390
1391 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
1392 use count before clobbering r_type.
1393 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
1394 ordering would mean dataflow inspection is necessary.
1395
1396 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
1397
1398 * coffcode.h (coff_set_flags): Added get/set arch hooks.
1399
1400 2003-01-20 Fabio Alemagna <falemagn@aros.org>
1401
1402 * elf32-sh.c: Treat elfNN_bed like other macros defined in
1403 elfxx-target.h and #undef it before #define'ing it.
1404 * elf32-i386.c: Likewise.
1405 * elf32-sh64.c: Likewise.
1406 * elf64-alpha.c: Likewise.
1407 * elf64-sh64.c: Likewise.
1408
1409 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
1410
1411 * bfd-in2.h: Regenerate.
1412 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
1413 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
1414 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
1415 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
1416 R_390_PLTOFF32 and R_390_PLTOFF64.
1417 (elf_s390_reloc_type_lookup): Likewise.
1418 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
1419 of GOTPLT references to a function.
1420 (link_hash_newfunc): Initialize gotplt_refcount.
1421 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
1422 and creation of the got section out of the main switch. Add support
1423 for the gotoff, gotplt and pltoff relocations.
1424 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
1425 and pltoff.
1426 (elf_s390_adjust_gotplt): New function.
1427 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
1428 plt entries.
1429 (allocate_dynrelocs): Add comment.
1430 (elf_s390_relocate_section): Change r_type to unsigned. Add support
1431 for gotoff, gotplt and pltoff relocations.
1432 * elf64-s390.c: Same changes as for elf32-s390.c.
1433 * libbfd.h: Regenerate.
1434 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
1435 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
1436 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
1437 and BFD_RELOC_390_PLTOFF64.
1438
1439 2003-01-18 Jakub Jelinek <jakub@redhat.com>
1440
1441 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
1442 R_IA64_TPREL64[LM]SB against non-global symbol properly.
1443
1444 2003-01-16 Jakub Jelinek <jakub@redhat.com>
1445
1446 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
1447 self_dtpmod_done and self_dtpmod_offset.
1448 (allocate_global_data_got): Only use one got entry for all
1449 dtpmod relocs against local symbols.
1450 (allocate_dynrel_entries): Only need .rela.got entry for
1451 dtpmod against global symbol.
1452 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
1453 Reserve space in .rela.got for the local dtpmod entry.
1454 (set_got_entry): Initialize the common local dtpmod .got entry.
1455 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
1456 and R_IA_64_DTPREL64MSB.
1457
1458 2003-01-16 Alan Modra <amodra@bigpond.net.au>
1459
1460 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
1461 (R_PPC_*): Rename all occurrences to R_PPC64_*.
1462 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
1463 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
1464 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
1465 relative relocs, not with absolute ones.
1466 * Makefile.am: Run "make dep-am".
1467 * Makefile.in: Regenerate.
1468 * po/SRC-POTFILES.in: Regenerate.
1469
1470 2003-01-15 Andreas Schwab <schwab@suse.de>
1471
1472 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
1473 relocation against a non-allocated readonly section.
1474
1475 2003-01-10 Alan Modra <amodra@bigpond.net.au>
1476
1477 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
1478 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
1479
1480 2002-01-08 Klee Dienes <kdienes@apple.com>
1481
1482 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
1483 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
1484 * Makefile.in: Regenerate.
1485
1486 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
1487
1488 * elfn32-mips.c (prev_reloc_section): New.
1489 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
1490 (SET_RELOC_ADDEND): Parenthesize macro argument.
1491
1492 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
1493
1494 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
1495 adjust addil instructions if the symbol has no section.
1496
1497 2003-01-07 DJ Delorie <dj@redhat.com>
1498
1499 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
1500 partial_inplace.
1501
1502 2003-01-07 Andreas Schwab <schwab@suse.de>
1503
1504 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
1505 PC relative relocations.
1506 (elf_m68k_discard_copies): Set it here instead.
1507
1508 2002-01-02 Ben Elliston <bje@redhat.com>
1509 Jeff Johnston <jjohnstn@redhat.com>
1510
1511 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
1512 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
1513 (BFD32_BACKENDS): Add elf32-iq2000.lo.
1514 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
1515 (cpu-iq2000.lo): New target.
1516 * Makefile.in: Regenerate.
1517 * config.bfd: Handle iq2000-*-elf.
1518 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
1519 (bfd_archures_list): Add bfd_iq2000_arch.
1520 * configure.in: Handle bfd_elf32_iq2000_vec.
1521 * configure: Regenerate.
1522 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
1523 and BFD_RELOC_IQ2000_UHI16.
1524 * targets.c (bfd_elf32_iq2000_vec): Declare.
1525 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
1526 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
1527 * cpu-iq2000.c: New file.
1528 * elf32-iq2000.c: Likewise.
1529 * libbfd.h: Regenerate.
1530 * bfd-in2.h: Likewise.
1531
1532 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
1533
1534 * elfxx-mips.c: Include libiberty.h.
1535 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
1536 (mips_set_isa_flags): New function, split out from...
1537 (_bfd_mips_elf_final_write_processing): ...here. Only call
1538 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
1539 (mips_mach_extensions): New array.
1540 (mips_32bit_flags_p): New function.
1541 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
1542 Use mips_32bit_flags_p to check if one binary is 32-bit and the
1543 other is 64-bit. When adopting IBFD's architecture, adopt the
1544 bfd_mach as well as the flags.
1545
1546 2003-01-02 Nick Kelsey <nickk@ubicom.com>
1547
1548 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
1549 fix internal errors, fix bad code generation, fix incorrect stabs
1550 information, and improve ability to eliminate redundant page
1551 instructions. Added code to ip2k_final_link_relocate to self-verify
1552 the linker relaxation. Fix formatting problems.
1553
1554 2002-12-30 Chris Demetriou <cgd@broadcom.com>
1555
1556 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
1557 * archures.c (bfd_mach_mipsisa32r2): New define.
1558 * bfd-in2.h: Regenerate.
1559 * cpu-mips.c (I_mipsisa32r2): New enum value.
1560 (arch_info_struct): Add entry for I_mipsisa32r2.
1561 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
1562 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
1563 (_bfd_mips_elf_final_write_processing): Add
1564 bfd_mach_mipsisa32r2 case.
1565 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
1566 binaries marked as using MIPS32 Release 2.
1567
1568 2002-12-30 Dmitry Diky <diwil@mail.ru>
1569
1570 * Makefile.am: Add msp430 target.
1571 * configure.in: Likewise.
1572 * Makefile.in: Regenerate.
1573 * configure: Regenerate.
1574 * archures.c: Add msp430 architecture vector.
1575 * config.bfd: Likewise.
1576 * reloc.c: Add msp430 relocs.
1577 * targets.c: Add msp320 target.
1578 * cpu-msp430.c: New file: msp430 cpu detection.
1579 * elf32-msp430.c: New file: msp430 reloc processing.
1580 * bfd-in2.h: Regenerate.
1581 * libbfd.h: Regenerate.
1582
1583 2002-12-28 Jakub Jelinek <jakub@redhat.com>
1584
1585 * elf.c (elf_sort_sections): Don't reorder .tbss.
1586 (assign_file_positions_for_segments): Only adjust off/voff
1587 for increased alignment in PT_LOAD or PT_NOTE segment,
1588 but adjust p_filesz for .tbss too. in PT_LOAD consider
1589 .tbss to have zero memory size.
1590 (copy_private_bfd_data) [SECTION_SIZE]: Define.
1591 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
1592 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
1593 into PT_TLS segment. Never put SHF_TLS sections in
1594 segments other than PT_TLS or PT_LOAD.
1595
1596 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
1597 sh_entsize.
1598
1599 2002-12-23 DJ Delorie <dj@redhat.com>
1600
1601 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
1602
1603 2002-12-23 Alan Modra <amodra@bigpond.net.au>
1604
1605 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
1606
1607 2002-12-23 Nick Clifton <nickc@redhat.com>
1608
1609 * archures.c (bfd_arch_get_compatible): Add third parameter
1610 'accept_unknowns'. Only accept unknown format BFDs if
1611 accept_unknowns is true, or if the format is "binary".
1612 * bfd-in2.h: Regenerate.
1613
1614 2002-12-21 Nick Clifton <nickc@redhat.com>
1615
1616 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
1617 that subtracted 8 from pc relative relocations.
1618
1619 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
1620
1621 * coff-h8300.c: Fix comment typos.
1622 * coffcode.h: Likewise.
1623 * cpu-cris.c: Likewise.
1624 * elf32-vax.c: Likewise.
1625 * genlink.h: Likewise.
1626 * linker.c: Likewise.
1627 * som.c: Likewise.
1628 * tekhex.c: Likewise.
1629 * vms-misc.c: Likewise.
1630
1631 2002-12-20 DJ Delorie <dj@redhat.com>
1632
1633 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
1634 * libbfd.h: Regenerate.
1635 * bfd-in2.h: Regenerate.
1636 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
1637 (xstormy16_reloc_map): Add R_XSTORMY16_12.
1638
1639 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
1640
1641 * doc/bfdint.texi: Fix typos.
1642
1643 2002-12-20 Paul Eggert <eggert@twinsun.com>
1644
1645 Port to POSIX 1003.1-2001.
1646 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
1647 * configure.in (build-warnings): Likewise.
1648 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
1649 * aclocal.m4: Regenerate.
1650 * config.in: Regenerate.
1651 * configure: Regenerate.
1652
1653 2002-12-19 Alan Modra <amodra@bigpond.net.au>
1654
1655 * coff-h8300.c: Include libiberty.h.
1656 (h8300_reloc16_extra_cases): Check the hash table creator before
1657 referencing h8300 specific fields. Stash the hash table pointer
1658 in a local var. Comment typo fixes.
1659 (h8300_bfd_link_add_symbols): Likewise.
1660
1661 * bfd/reloc.c (struct reloc_howto_struct): Revise src_mask and
1662 dst_mask comments.
1663 * bfd-in2.h: Regenerate.
1664
1665 2002-12-18 Alan Modra <amodra@bigpond.net.au>
1666
1667 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
1668 code a little. Comment on dynamic relocs against section symbols.
1669
1670 2002-12-17 Roger Sayle <roger@eyesopen.com>
1671
1672 * configure.host (ia64-*-hpux*): Support 64 bit targets using
1673 the HP compiler's "long long".
1674
1675 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
1676
1677 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
1678 and R_XSTORMY16_HI16) howto entries.
1679 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
1680 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
1681 determine the start of the second reloc table.
1682
1683 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
1684
1685 * ecofflink.c: Fix the reading of the debugging information
1686 of Tru64/Alpha binaries that are produced by recent Compaq
1687 compilers.
1688 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
1689 table.
1690 (lookup_line): Because of the strange information sometimes
1691 generated by Compaq's recent compilers, change how the FDR
1692 table is searched so that PDRs (procedure descriptors) are
1693 correctly found. Note that this change is really more of a hack;
1694 however, I have included extensive documentation as to why
1695 this is the best solution short of an extensive rewrite or
1696 another hack.
1697 (fdrtab_lookup): Add comments to explain the algorithm.
1698
1699 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1700
1701 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
1702 initializers to match struct declaration.
1703
1704 2002-12-12 Alan Modra <amodra@bigpond.net.au>
1705
1706 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
1707 * elf.c (get_program_header_size): Likewise.
1708 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
1709 (m32r_elf_generic_reloc): Likewise.
1710 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
1711 * elflink.h (elf_bfd_discard_info): Likewise.
1712
1713 2002-12-12 Alan Modra <amodra@bigpond.net.au>
1714
1715 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
1716 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
1717 DT_RELSZ adjustment, not output section. Avoid writing tags when
1718 unchanged. Don't assume linker script is sane, adjust DT_REL too.
1719 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
1720 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
1721 DT_RELASZ adjustment, not output section. Avoid writing tags when
1722 unchanged. Adjust DT_RELA.
1723 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
1724 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
1725
1726 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1727
1728 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
1729 addend by 4.
1730
1731 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1732
1733 * elfxx-mips.c (struct mips_got_entry): New.
1734 (struct mips_got_info): Added got_entries field.
1735 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
1736 (mips_elf_local_got_index, mips_elf_got_page,
1737 mips_elf_got16_entry): Re-implement in terms of new...
1738 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
1739 Change return type.
1740 (mips_elf_highest): Warning clean-up.
1741 (mips_elf_create_got_section): Initialize got_entries.
1742 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
1743 local got size.
1744 (_bfd_mips_elf_size_dynamic_sections): Do not account for
1745 GOT_PAGE entries, since we now reuse GOT16 entries.
1746
1747 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
1748
1749 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
1750 read-only section that lies after .text and before .data to be
1751 written into the output file and included in a_text.
1752 (translate_to_native_sym_flags): If an otherwise unrepresentable
1753 section was merged with .text, convert its symbols to N_TEXT
1754 symbols.
1755 * libaout.h (aout_section_merge_with_text_p): New macro.
1756
1757 2002-12-08 Alan Modra <amodra@bigpond.net.au>
1758
1759 * bfd-in.h: Comment typo fix. Formatting.
1760 * bfd-in2.h: Regenerate.
1761 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
1762 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
1763 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
1764
1765 2002-12-05 Richard Henderson <rth@redhat.com>
1766
1767 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
1768 Only send PCREL21B though the plt. Fix installed reloc type.
1769 (elfNN_ia64_relocate_section): Give error for dynamic reloc
1770 against PCREL22 or PCREL64I; clean up error messages for
1771 branch relocs.
1772
1773 2002-12-04 Kevin Buettner <kevinb@redhat.com>
1774
1775 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
1776 New functions.
1777 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
1778
1779 2002-12-04 David Mosberger <davidm@hpl.hp.com>
1780
1781 * cpu-ia64-opc.c: Add operand constant "ar.csd".
1782
1783 2002-12-04 H.J. Lu <hjl@gnu.org>
1784
1785 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
1786 BFD address when constructing local name.
1787
1788 2002-12-04 Andreas Schwab <schwab@suse.de>
1789
1790 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
1791 member.
1792 (elf_m68k_link_hash_table_create): Initialize it.
1793 (elf_m68k_check_relocs): Handle symbols that are forced to be
1794 local due to visibility changes.
1795 (elf_m68k_adjust_dynamic_symbol): Likewise.
1796 (elf_m68k_size_dynamic_sections): Likewise.
1797 (elf_m68k_discard_copies): Likewise.
1798 (elf_m68k_relocate_section): Likewise.
1799
1800 2002-12-04 Alan Modra <amodra@bigpond.net.au>
1801
1802 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
1803
1804 2002-12-04 Alan Modra <amodra@bigpond.net.au>
1805
1806 * srec.c (srec_write_symbols): Restore '$' prefix to address
1807 accidentally removed in 2002-04-04 change.
1808 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
1809
1810 2002-12-03 Nick Clifton <nickc@redhat.com>
1811
1812 * elf32-ppc.c (apuinfo_list_init): New function.
1813 (apuinfo_list_add): New function: Add a value to the list.
1814 (apuinfo_list_length): New function: Return the number of
1815 values on the list.
1816 (apuinfo_list_element): New function: Return a value on the
1817 list.
1818 (apuinfo_list_finish): New function: Free the resources used
1819 by the list.
1820 (ppc_elf_begin_write_processing): New function. Scan the
1821 input bfds for apuinfo sections.
1822 (ppc_elf_write_section): New function: Delay the creation of
1823 the contents of an apuinfo section in an output bfd.
1824 (ppc_elf_final_write_processing): New function. Create the
1825 contents of an apuinfo section in an output bfd.
1826 (elf_backend_begin_write_processing): Define.
1827 (elf_backend_final_write_processing): Define.
1828 (elf_backend_write_section): Define.
1829
1830 2002-12-03 Richard Henderson <rth@redhat.com>
1831
1832 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
1833
1834 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
1835
1836 Fix PR savannah/1417:
1837 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
1838 branch if it goes to the start of the deleted region.
1839
1840 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
1841
1842 * bfd-in2.h (bfd_mach_m6812): Rebuild.
1843 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
1844 bfd_mach_m6812s): Declare.
1845
1846 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
1847 (_bfd_m68hc12_elf_set_private_flags): Call it.
1848 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
1849 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
1850 report microcontroller incompatibilities (HC12 vs HCS12).
1851 (elf_backend_object_p): Update.
1852
1853 2002-11-30 Alan Modra <amodra@bigpond.net.au>
1854
1855 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
1856 (enum bfd_boolean, boolean): Delete.
1857 (bfd_boolean): Typedef to an int.
1858 (FALSE, TRUE): Define.
1859 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
1860 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
1861 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
1862 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
1863 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
1864 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
1865 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
1866 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
1867 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
1868 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
1869 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
1870 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
1871 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
1872 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
1873 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
1874 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
1875 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
1876 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
1877 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
1878 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
1879 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
1880 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
1881 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
1882 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
1883 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
1884 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1885 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
1886 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
1887 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
1888 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
1889 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
1890 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
1891 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
1892 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
1893 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
1894 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
1895 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
1896 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
1897 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
1898 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
1899 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
1900 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
1901 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
1902 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
1903 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
1904 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
1905 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
1906 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
1907 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
1908 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
1909 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
1910 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
1911 of bfd_boolean vars with TRUE/FALSE. Formatting.
1912 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
1913
1914 2002-11-28 Alan Modra <amodra@bigpond.net.au>
1915
1916 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
1917 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
1918 with Elf_Internal_Rela.
1919 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
1920 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
1921 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
1922 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1923 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
1924 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
1925 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
1926 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
1927 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
1928 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
1929 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
1930 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
1931 throughout instead.
1932 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
1933 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
1934 Remove INLINE keyword.
1935 (elf_swap_reloc_in): Likewise. Also clear r_addend.
1936 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
1937 as a bfd_byte *.
1938 (elf_write_relocs): Consolidate REL and RELA code.
1939 (elf_slurp_reloc_table_from_section): Simplify REL code.
1940 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
1941 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
1942 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
1943 RELA code.
1944 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
1945 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
1946 (elf_link_output_relocs): Likewise.
1947 (elf_reloc_link_order): Likewise.
1948 (elf_finish_pointer_linker_section): Likewise.
1949 (struct elf_link_sort_rela): Remove union.
1950 (elf_link_sort_cmp1): Update to suit.
1951 (elf_link_sort_cmp2): Here too.
1952 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
1953 over-allocation for int_rels_per_ext_rel != 1 case.
1954 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
1955 * elf32-i386.c: Likewise.
1956 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
1957 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
1958 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
1959 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
1960 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
1961 elf64-sparc.c, elf64-x86-64.c: Likewise.
1962 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
1963 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
1964 bfd_elf32_swap_reloc_in.
1965
1966 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
1967 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
1968 (mips_elf64_swap_reloc_in): Zero r_addend.
1969 (mips_elf64_be_swap_reloc_in): Likewise.
1970 (mips_elf64_slurp_one_reloc_table): Simplify.
1971
1972 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
1973 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1974 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
1975
1976 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1977
1978 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
1979 unresolved debugging relocs in dynamic applications.
1980 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1981
1982 2002-11-26 Alan Modra <amodra@bigpond.net.au>
1983
1984 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
1985 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
1986 on a relocatable link. Comment typos.
1987 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
1988 in the order they are declared. Clear elf_hash_value too.
1989 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
1990 eh_info and tls_segment.
1991 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
1992 sorted when discarding relocs by turning them into R_*_NONE.
1993
1994 * libbfd.c (warn_deprecated): Comment spelling.
1995 * po/SRC-POTFILES.in: Regenerate.
1996
1997 2002-11-21 Richard Henderson <rth@redhat.com>
1998
1999 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
2000 arch's st_other bits when merging visibilities.
2001 (elf_link_output_extsym): Tidy clearing of visibility field.
2002
2003 2002-11-21 Alan Modra <amodra@bigpond.net.au>
2004
2005 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
2006 (SWAP_OUT_RELOC_OFFSET): Define.
2007
2008 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
2009
2010 * elf.c (_bfd_elf_link_hash_table_init): Make sure
2011 can_refcount is properly extended to the type of
2012 init_refcount.
2013
2014 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
2015
2016 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
2017 (_bfd_mips_elf_relocate_section): Use it.
2018
2019 * elfxx-mips.c (MNAME): New macro.
2020 (_bfd_mips_elf_check_relocs): Use it.
2021 (_bfd_mips_elf_discard_info): Likewise.
2022 (_bfd_mips_elf_final_link): Likewise.
2023
2024 2002-11-19 Alan Modra <amodra@bigpond.net.au>
2025
2026 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
2027 rel_hdr.sh_size too.
2028
2029 2002-11-18 Klee Dienes <kdienes@apple.com>
2030
2031 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
2032 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
2033 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
2034 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
2035 Add dependencies for bfdwin.c, bfdio.c.
2036 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
2037 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
2038 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
2039 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
2040 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
2041 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
2042 bfd_get_size (moved from libbfd.c and bfd.c).
2043 * bfdwin.c New file. Contains _bfd_window_internal,
2044 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
2045 libbfd.c and bfd.c).
2046 * po/SRC-POTFILES.in: Regenerate.
2047 * po/bfd.pot: Regenerate.
2048 * libbfd.h: Regenerate.
2049 * bfd-in2.h: Regenerate.
2050 * aclocal.m4: Regenerate.
2051 * Makefile.in: Regenerate.
2052 * configure: Regenerate.
2053
2054 2002-11-18 Klee Dienes <kdienes@apple.com>
2055
2056 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
2057
2058 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
2059
2060 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
2061 jsr after a short jump.
2062 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
2063
2064 2002-11-15 Klee Dienes <kdienes@apple.com>
2065
2066 * pef.c (bfd_pef_convert_architecture): Move declaration of
2067 ARCH_POWERPC and ARCH_M68K to the start of the function.
2068
2069 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
2070
2071 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
2072
2073 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
2074
2075 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
2076 For bpo_gregs_section->contents, allocate _raw_size, not
2077 _cooked_size.
2078
2079 2002-11-13 Klee Dienes <kdienes@apple.com>
2080
2081 * config.bfd: Add entries for powerpc-*-darwin and cousins.
2082
2083 2002-11-13 H.J. Lu <hjl@gnu.org>
2084
2085 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
2086
2087 2002-11-13 Klee Dienes <kdienes@apple.com>
2088 Alan Modra <amodra@bigpond.net.au>
2089
2090 * bfd.c (struct bfd_preserve): New.
2091 (bfd_preserve_save): New function.
2092 (bfd_preserve_restore): Ditto.
2093 (bfd_preserve_finish): Ditto.
2094 * bfd-in2.h: Regenerate.
2095 * mach-o.c: Formatting.
2096 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
2097 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
2098 (bfd_mach_o_core_p): Ditto.
2099 (bfd_mach_o_scan): Pass in mdata.
2100 * mach-o.h (bfd_mach_o_scan): Update prototype.
2101 * pef.c: Formatting.
2102 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
2103 (bfd_pef_xlib_object_p): Ditto.
2104 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
2105 * pef.h (bfd_pef_scan): Update prototype.
2106 * xsym.c: Formatting, K&R fixes.
2107 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
2108 (bfd_sym_scan): New function split out from bfd_sym_object_p.
2109 * xsym.h (bfd_sym_scan): Declare.
2110 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
2111 * elfcore.h (elf_core_file_p): Likewise.
2112 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
2113
2114 2002-11-12 Nick Clifton <nickc@redhat.com>
2115
2116 * po/da.po: Updated Danish translation.
2117
2118 2002-11-12 Alan Modra <amodra@bigpond.net.au>
2119
2120 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
2121 relocatable link too.
2122 (elf_link_input_bfd): When emitting relocs, adjust offsets for
2123 eh_frame and stab sections. Zap deleted relocs.
2124 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
2125 (elf_bfd_discard_info): Run for relocatable link too.
2126 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
2127 Handle ld -r case.
2128 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
2129 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
2130
2131 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
2132 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
2133 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
2134 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
2135 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
2136 (struct elf_link_hash_table): Add eh_info.
2137 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
2138 (_bfd_elf_discard_section_eh_frame): Update prototype.
2139 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
2140 (_bfd_elf_write_section_eh_frame): Likewise.
2141 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
2142 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
2143 param. Get "hdr_info" from link hash table.
2144 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
2145 header section from link hash table. Save header section to elf_tdata.
2146 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
2147 header section from link hash table. Don't alloc hdr_info. Clear
2148 hdr_sec instead of setting "strip".
2149 (_bfd_elf_eh_frame_section_offset): Formatting.
2150 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
2151 Get header section from link hash table.
2152 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
2153 Get header section from link hash table.
2154 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
2155 (get_program_header_size): Likewise.
2156 (_bfd_elf_section_offset): Formatting.
2157 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
2158 section pointer in link hash table.
2159 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
2160 and _bfd_elf_write_section_eh_frame calls. Update comment about
2161 eh_frame entries.
2162 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
2163 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
2164
2165 * po/SRC-POTFILES.in: Regenerate.
2166
2167 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
2168 relocs for discarded FDEs. Remove dead code.
2169 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
2170 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
2171 Tidy conditions under which stabs are edited. Formatting.
2172 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
2173 from discarded relocs.
2174 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
2175 section adjustments after testing magic values.
2176
2177 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
2178
2179 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
2180 references to large plt symbols.
2181
2182 2002-11-12 Klee Dienes <kdienes@apple.com>
2183
2184 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
2185 looking for an unused section name.
2186
2187 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
2188
2189 * coff-h8300.c: Fix formatting.
2190 * elf32-h8300.c: Likewise.
2191 * reloc16.c: Likewise.
2192
2193 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
2194
2195 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
2196 section when dynamic section unused; _bfd_strip_section_from_output
2197 instead.
2198
2199 2002-11-08 Alan Modra <amodra@bigpond.net.au>
2200
2201 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
2202 and sym_vec.
2203
2204 * dwarf2.c: Revert last change.
2205
2206 2002-11-07 Michal Ludvig <mludvig@suse.cz>
2207
2208 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
2209 _bfd_dwarf2_find_nearest_line): Use
2210 bfd_simple_get_relocated_section_contents() instead of
2211 bfd_get_section_contents().
2212 * reloc.c (bfd_perform_relocation): Add sanity check.
2213 * simple.c (simple_get_relocated_section_contents): If the section
2214 does not have any relocs associated with it, just return the
2215 unadjusted contents.
2216
2217 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
2218
2219 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
2220 case R_CRIS_32_GOT>: Correct test for filling in constant .got
2221 contents, enabling for a non-DSO, for symbols defined in the
2222 program with --export-dynamic.
2223
2224 2002-11-07 Alan Modra <amodra@bigpond.net.au>
2225
2226 * elf64-ppc.c: Comment typo fixes.
2227 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
2228
2229 2002-11-07 Nick Clifton <nickc@redhat.com>
2230
2231 * po/da.po: Updated Danish translation.
2232
2233 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
2234
2235 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
2236 exactly three internal relocs per external reloc. Set reloc_count
2237 to the external reloc count.
2238
2239 2002-11-06 Klee Dienes <kdienes@apple.com>
2240
2241 * coff-stgo32.c (stub_bytes): Mark as const.
2242 Fix comment formatting.
2243
2244 2002-11-06 Klee Dienes <kdienes@apple.com>
2245
2246 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
2247 xsym.lo.
2248 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
2249 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
2250 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
2251 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
2252 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
2253 sym.
2254 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
2255 * Makefile.in: Regenerate.
2256 * doc/Makefile.in: Regenerate.
2257 * bfd-in2.h: Regenerate.
2258 * xsym.c: New file. Contains support for the Apple/Metrowerks
2259 xSYM debugging format.
2260 * xsym.h: New file.
2261 * pef.c: New file. Contains support for the Apple Code Fragment
2262 Manager Preferred Executable Format
2263 * pef.h: New file.
2264 * pef-traceback.h: New file. Contains support for parsing PowerPC
2265 traceback tables as used by PEF executables (and perhaps other
2266 systems as well).
2267 * mach-o.c: New file. Contains support for the Mach-O object file
2268 format.
2269 * mach-o.h: New file.
2270 * mach-o-target.c: New file. Declares the mach-o targets
2271 themselves. Included three times by mach-o.c; each time with a
2272 different set of macros set.
2273
2274 2002-11-06 Graeme Peterson <gp@qnx.com>
2275
2276 * Makefile.am: Remove entries for elf32-qnx.[ch].
2277 * Makefile.in: Regenerate.
2278 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
2279 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
2280 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
2281 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
2282 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
2283 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
2284 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
2285 * configure: Regenerate.
2286 * elf32-qnx.c: Remove.
2287 * elf32-qnx.h: Remove.
2288 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
2289 is_contained_by_filepos, and copy_private_bfd_data_p.
2290 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
2291 is_contained_by_filepos, and copy_private_bfd_data_p.
2292 * elf32-i386.c: Remove QNX extended bfd support.
2293 * elf32-ppc.c: Remove QNX extended bfd support.
2294 * elf32-sh.c: Remove QNX extended bfd support.
2295 * elfarm-nabi.c: Remove QNX extended bfd support.
2296 * targets.c: Remove qnx vectors.
2297 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
2298 (elf_backend_is_contained_by_filepos): Remove.
2299 (elf_backend_copy_private_bfd_data_p): Remove.
2300 * po/SRC-POTFILES.in: Regenerate.
2301
2302 2002-11-06 David O'Brien <obrien@FreeBSD.org>
2303 Alan Modra <amodra@bigpond.net.au>
2304
2305 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
2306 dynamic relocs against section symbols for the output section vma.
2307
2308 2002-11-05 Alan Modra <amodra@bigpond.net.au>
2309
2310 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
2311 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
2312
2313 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2314 Alan Modra <amodra@bigpond.net.au>
2315
2316 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
2317 vectors in target_selvecs.
2318 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
2319 in target_selvecs.
2320 (sh-*-netbsdelf*): Likewise.
2321 * configure.in (assocvecs): New variable. Handle assocvecs like
2322 selvecs.
2323 * configure: Regenerate.
2324 * format.c (bfd_check_format_matches): Store bfd_target pointers
2325 in matching_vector instead of target names. Select first target
2326 from bfd_associated_vector that matches a list of ambiguous targets.
2327 * targets.c (_bfd_associated_vector): New array.
2328 (bfd_associated_vector): New variable.
2329 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
2330 * libbfd-in.h (bfd_associated_vector): Declare.
2331 * libbfd.h: Regenerate.
2332
2333 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
2334
2335 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
2336 non-NULL before dereferencing.
2337
2338 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2339
2340 * vms.c (vms_object_p): Restore the start address when returning
2341 NULL.
2342
2343 2002-11-04 Alan Modra <amodra@bigpond.net.au>
2344 Hans-Peter Nilsson <hp@axis.com>
2345
2346 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
2347 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
2348 Set up a larger symshndxbuf, and write it out. Free it on
2349 exit rather than freeing symbuf twice. Correct section index
2350 on output section symbol loop.
2351 (elf_link_output_sym): Accumulate symbol extension section
2352 indices, reallocating symshndxbuf rather than writing it out.
2353 (elf_link_flush_output_syms): Don't flush symshndxbuf.
2354 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
2355 Use bfd_zalloc to clear i_shdrp[0] too.
2356
2357 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
2358
2359 * elf32-sh64-com.c (sh64_address_in_cranges): Use
2360 _raw_size of cranges section if _cooked_size not yet set.
2361
2362 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
2363
2364 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
2365 for bfd_elf32_swap_symbol_out.
2366
2367 2002-10-31 David O'Brien <obrien@FreeBSD.org>
2368
2369 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
2370 signed and unsigned in comparison.
2371
2372 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
2373
2374 * coffcode.h: Remove extraneous '\'.
2375
2376 2002-10-28 H.J. Lu <hjl@gnu.org>
2377
2378 * Makefile.am (targets.lo): Depend on Makefile instead of
2379 config.status.
2380 (archures.lo): Likewise.
2381 * Makefile.in: Regenerated.
2382
2383 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
2384
2385 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
2386 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
2387 targ_selvecs.
2388
2389 2002-10-25 Jim Wilson <wilson@redhat.com>
2390
2391 * elf64-sh64.c (sh_elf64_relocate_section): Call
2392 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
2393 of SHF_MERGE section.
2394
2395 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
2396
2397 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
2398
2399 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
2400
2401 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
2402 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
2403 unsigned int.
2404 (NAME(aout,final_link)): Cast enum used in assignment.
2405 (aout_link_write_symbols): Cast enums in comparisons, int values to
2406 boolean, enums in assignments to int.
2407 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
2408 (aout_link_input_section_ext): Likewise. Cast enums used in comparisons
2409 with unsigned ints.
2410 (aout_link_reloc_link_order): Cast enum to int in assignment.
2411 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
2412 calls to char *.
2413 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
2414 assignment.
2415 * bfd-in2.h (bfd_set_section_vma): Likewise.
2416 * bfd.c (bfd_record_phdr): Cast enums in assignments.
2417 * binary.c (bfd_alloc): Cast enum to long.
2418 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
2419 * dwarf2.c (read_abbrevs): Add casts to enum types.
2420 (read_attribute_value): Likewise.
2421 (arange_add): Cast result of bfd_zalloc call.
2422 (comp_unit_contains_address): Return true and false.
2423 (comp_unit_find_nearest_line): Cast return to boolean.
2424 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
2425 * gen-aout.c: define macro '_' if not defined.
2426 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
2427 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
2428 (bfd_write_bigendian_4byte_int): Cast return to boolean.
2429 (bfd_seek): Cast bfd_realloc to bfd_byte *.
2430 (bfd_generic_is_local_label_name): Cast return to boolean.
2431 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
2432 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
2433 struct bfd_hash_entry *.
2434 (_bfd_generic_link_hash_newfunc): likewise.
2435 (_bfd_generic_final_link): Cast enum to unsigned int.
2436 * merge.c (sec_merge_emit): Cast return to boolean.
2437 (merge_strings): Add casts to const unsigned char *.
2438 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
2439 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
2440 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result to
2441 struct bfd_hash_entry *.
2442 (bfd_set_section_content): Add cast to PTR in comparison.
2443 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
2444 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
2445 simple_dummy_unattached_reloc,
2446 bfd_simple_get_relocated_section_contents): Add K&R declarations and
2447 function definitions.
2448 * srec.c (S3Forced): Initialize to false.
2449 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
2450 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
2451 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
2452 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
2453 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
2454 comparisons.
2455
2456 2002-10-23 Jakub Jelinek <jakub@redhat.com>
2457
2458 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
2459 relocs into shared lib non-allocated reloc sections.
2460
2461 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
2462
2463 * dwarf2.c (add_line_info): Ensure that the line_info_table is
2464 sorted even when given an out-of-order line sequence.
2465 (lookup_address_in_line_info_table): When an exact VMA match is
2466 not found, return line information with the closest VMA.
2467
2468 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
2469
2470 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
2471 HPUX 11.00 patch PHSS_26559.
2472
2473 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
2474
2475 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
2476 the options section into a separate section unless IRIX 6
2477 compatibility is enabled.
2478
2479 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
2480
2481 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
2482 into arrays.
2483 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
2484 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
2485 into account.
2486 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
2487 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
2488
2489 2002-10-21 Graeme Peterson <gp@qnx.com>
2490
2491 * targets.c (_bfd_target_vector): Add missing qnx vectors.
2492
2493 2002-10-21 Alan Modra <amodra@bigpond.net.au>
2494
2495 * targets.c (bfd_target_list): Don't return the default target twice.
2496
2497 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
2498
2499 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
2500 perror with bfd_perror.
2501
2502 2002-10-19 H.J. Lu <hjl@gnu.org>
2503
2504 * elflink.h (elf_link_add_object_symbols): Correctly handle
2505 DT_RPATH and DT_RUNPATH.
2506
2507 2002-10-19 Mark Kettenis <kettenis@gnu.org>
2508
2509 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
2510
2511 2002-10-17 Denis Chertykov <denisc@overta.ru>
2512
2513 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
2514 for ip2k port.
2515
2516 2002-10-17 Alan Modra <amodra@bigpond.net.au>
2517
2518 * elfxx-target.h (USE_REL): Don't define as 1.
2519 * elf32-arm.h (USE_REL): Provide a default define of 0.
2520 Use #if rather than #ifdef when testing USE_REL.
2521 * elf32-m32r.c: Likewise.
2522
2523 * elf32-arc.c (USE_REL): Define as 1.
2524 * elf32-d10v.c (USE_REL): Likewise.
2525 * elf32-m32r.c (USE_REL): Likewise.
2526 * elf32-m68hc11.c (USE_REL): Likewise.
2527 * elf32-m68hc12.c (USE_REL): Likewise.
2528 * elf32-or32.c (USE_REL): Likewise.
2529 * elfarm-nabi.c (USE_REL): Likewise.
2530
2531 2002-10-16 Jakub Jelinek <jakub@redhat.com>
2532
2533 * config.bfd (s390-*-linux*): Add targ64_selvecs.
2534 (s390x-*-linux*): Add targ_selvecs.
2535
2536 2002-10-16 Alan Modra <amodra@bigpond.net.au>
2537
2538 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
2539 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2540 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
2541 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
2542 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
2543 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
2544 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
2545 (SOURCE_HFILES): Add elf32-qnx.h.
2546 (BUILD_HFILES): Add bfdver.h.
2547 Run "make dep-am".
2548 * Makefile.in: Regenerate.
2549 * configure.in Update bfd vector dependencies.
2550 * configure: Regenerate.
2551 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
2552 * elf32-i386qnx.c: Likewise.
2553 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
2554 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
2555 * elf32-sh-lin.c: Likewise.
2556 * elf32-shqnx.c: Likewise.
2557 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
2558 * elf32-sh64-nbsd.c: Likewise.
2559 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
2560 * elf64-sh64-nbsd.c: Likewise.
2561 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
2562 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
2563 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
2564 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
2565 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
2566 (elf_backend_is_contained_by_filepos): Likewise.
2567 (elf_backend_copy_private_bfd_data_p): Likewise.
2568 Globalize and move functions to..
2569 * elf32-qnx.c: ..here. New file.
2570 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
2571 emit target vectors when INCLUDE_SHMEDIA.
2572 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
2573 end of file.
2574 * elf64-sh64.c: Remove ELF_ARCH test.
2575 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
2576 * po/BLD-POTFILES.in: Regenerate.
2577 * po/SRC-POTFILES.in: Regenerate.
2578
2579 2002-10-16 Alan Modra <amodra@bigpond.net.au>
2580
2581 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
2582 loaded with --just-symbols.
2583
2584 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
2585 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
2586 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
2587 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
2588
2589 2002-10-15 Richard Henderson <rth@redhat.com>
2590
2591 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
2592 (BFD64_BACKENDS_CFILES): Likewise.
2593 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
2594 * elf64-alpha-fbsd.c: Remove file, move code ...
2595 * elf64-alpha.c: ... here.
2596 * Makefile.in, configure: Rebuild.
2597
2598 2002-10-14 Richard Henderson <rth@redhat.com>
2599
2600 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
2601 VALUE, not ADDEND.
2602
2603 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
2604
2605 * elf32-sh.c (elf_sh_link_hash_entry): Replace
2606 datalabel_got_offset with union of datalabel_got
2607 offset and refcount.
2608 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
2609 (allocate_dynrelocs): Delete unnecessary code for
2610 STT_DATALABEL type. Create entry in got for
2611 datalabel version of symbol if datalabel_got.refcount > 0.
2612 (sh_elf_relocate_section): Use datalabel_got union.
2613 (sh_elf_gc_sweep_hook): Pull common code to initialize
2614 h and eh out of switch statement. Declare seen_stt_datalabel.
2615 Initialize it. Decrement datalabel_got.refcount for
2616 got relocs when seen_stt_datalabel is true.
2617 Decrement local_got_refcounts entry for datalabel got relocs
2618 of local symbols.
2619 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
2620 (sh_elf_check_relocs): Declare seen_stt_datalabel.
2621 Initialize it. When seen_stt_datalabel is true, increment
2622 datalabel_got refcount rather than got.refcount.
2623 (sh_elf_finish_dynamic_symbol): Create relocs to
2624 initialize got entry for datalabel version of symbol.
2625
2626 2002-10-14 Alan Modra <amodra@bigpond.net.au>
2627
2628 * Makefile.am: Run "make dep-am".
2629 (BFD_H_FILES): Remove version.h.
2630 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
2631 * version.h: ..to here.
2632 * configure.in (bfd_version_date): Remove.
2633 (AC_OUTPUT): Make bfdver.h from version.h.
2634 * bfd.c: #include "bfdver.h".
2635 * vms-hdr.c: Likewise.
2636 * Makefile.in: Regenerate.
2637 * bfd-in2.h: Regenerate.
2638 * configure: Regenerate.
2639 * po/SRC-POTFILES.in: Regenerate.
2640
2641 2002-10-14 Alan Modra <amodra@bigpond.net.au>
2642
2643 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
2644 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
2645 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
2646 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
2647 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
2648 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
2649 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
2650 bfd_mach_ip2022, bfd_mach_ip2022ext,
2651 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
2652 * bfd-in2.h: Regenerate.
2653
2654 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2655
2656 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
2657 endian vector to targ_selvecs.
2658
2659 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
2660
2661 * elfxx-mips.c (mips_elf_calculate_relocation): Take
2662 save_addend argument. Don't apply the 32-bit mask to a
2663 GPREL32 value if it's to be used in another relocation. Don't
2664 use forced-check computation of local_p to decide whether to
2665 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
2666 of the addend of a non-in-place GPREL16 relocation.
2667 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
2668 mips_elf_calculate_relocation().
2669
2670 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
2671
2672 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
2673 with symbols in other sections if we relaxed something; the sections
2674 output offsets must be re-computed before.
2675
2676 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
2677
2678 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
2679 handling to use Elf_Internal_Sym.
2680 (m68hc11_elf_relax_delete_bytes): Likewise.
2681
2682 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2683
2684 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
2685 sh_elf_object_p, dtpoff_base): New functions.
2686 (sh_elf_howto_table): Add TLS relocs.
2687 (sh_reloc_map): Likewise.
2688 (sh_elf_info_to_howto): Support TLS relocs.
2689 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
2690 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
2691 New macros.
2692 (sh_elf_obj_tdata): New.
2693 (elf_sh_link_hash_table): Add tls_ldm_got.
2694 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
2695 (allocate_dynrelocs): Support TLS relocs.
2696 (sh_elf_size_dynamic_sections): Likewise.
2697 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
2698 .rela.got section when found already. Return false after printing
2699 error about unresolvable relocation.
2700 (sh_elf_gc_sweep_hook): Support TLS relocs.
2701 (sh_elf_check_relocs): Likewise.
2702 (sh_elf_finish_dynamic_symbol): Likewise.
2703 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
2704 * reloc.c: Add SH TLS relocs.
2705 * bfd-in2.h, libbfd.h: Regenerate.
2706
2707 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
2708
2709 * Makefile.in: Regenerated.
2710
2711 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
2712
2713 * Makefile.am: Run dep-am.
2714 (BFD_H_DEP): Add simple.c and linker.c.
2715 (BFD32_LIBS): Add simple.lo.
2716 (BFD32_LIBS_CFILES): Add simple.c.
2717 * Makefile.in: Regenerated.
2718 * bfd-in2.h: Regenerated.
2719 * simple.c: New file.
2720
2721 2002-10-11 Alan Modra <amodra@bigpond.net.au>
2722
2723 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
2724 (record_thumb_to_arm_glue): Likewise.
2725 * ecoff.c (ecoff_link_add_externals): Likewise.
2726 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
2727 (record_thumb_to_arm_glue): Likewise.
2728 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
2729 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2730 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
2731 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
2732 * elf64-ppc.c (func_desc_adjust): Likewise.
2733 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
2734 (sh64_elf64_create_dynamic_sections): Likewise.
2735 * elflink.c (_bfd_elf_create_got_section): Likewise.
2736 (_bfd_elf_create_dynamic_sections): Likewise.
2737 (_bfd_elf_create_linker_section): Likewise.
2738 * elflink.h (elf_add_default_symbol): Likewise.
2739 (elf_link_create_dynamic_sections): Likewise.
2740 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
2741 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
2742 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
2743 (_bfd_mips_elf_add_symbol_hook): Likewise.
2744 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2745 * linker.c (generic_link_add_symbol_list): Likewise.
2746 * xcofflink.c (xcoff_link_add_symbols): Likewise.
2747
2748 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
2749
2750 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
2751 completely removed. Correct local sym adjustment.
2752
2753 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
2754
2755 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
2756 Correct mistake in calculation of address of .got.
2757 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
2758 elf_sh64_pic_plt_entry_le): Likewise.
2759
2760 2002-10-09 Richard Shann <richard.shann@superh.com>
2761 Stephen Clarke <stephen.clarke@superh.com>
2762
2763 * Makefile.am: Add entries for elf32-sh64-lin.c and
2764 elf64-sh64-lin.c. Regenerate.
2765 * Makefile.in: Regenerate.
2766 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
2767 to use sh64 vectors rather than sh vectors.
2768 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
2769 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
2770 * configure: Regenerate.
2771 * elf32-sh64-lin.c: New file.
2772 * elf64-sh64-lin.c: New file.
2773 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
2774 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
2775
2776 2002-10-08 H.J. Lu <hjl@gnu.org>
2777
2778 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
2779 IE->LE transition for R_386_TLS_IE.
2780
2781 2002-10-08 Alan Modra <amodra@bigpond.net.au>
2782
2783 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
2784
2785 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
2786
2787 * cofflink.c (mark_relocs): Don't mark relocations in excluded
2788 sections.
2789
2790 2002-10-07 Alan Modra <amodra@bigpond.net.au>
2791
2792 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
2793 code.
2794
2795 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
2796
2797 2002-10-06 Alan Modra <amodra@bigpond.net.au>
2798
2799 * opncls.c: Formatting.
2800 (_bfd_new_bfd): Use a smaller section hash table.
2801
2802 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
2803
2804 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
2805 of the other two relocations packed with a REL32 to NONE.
2806
2807 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
2808
2809 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
2810 (sh_elf_link_hash_newfunc): Initialize it.
2811 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
2812 to got.refcount for symbols that are forced local or when
2813 we have direct got refs.
2814 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
2815 to correctly adjust got.refcount and plt.refcount.
2816 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
2817 (sh_elf_check_relocs): Increment gotplt_refcount.
2818
2819 2002-10-01 Jakub Jelinek <jakub@redhat.com>
2820
2821 * elf32-i386.c (elf_i386_relocate_section): Fix
2822 movl foo@indntpoff, %eax IE->LE transition.
2823
2824 2002-10-01 Jakub Jelinek <jakub@redhat.com>
2825
2826 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
2827 sequence and its transitions.
2828
2829 2002-10-01 Jakub Jelinek <jakub@redhat.com>
2830
2831 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
2832 to st_value + addend in non-code sections.
2833 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
2834 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
2835
2836 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
2837 Ken Raeburn <raeburn@cygnus.com>
2838 Aldy Hernandez <aldyh@redhat.com>
2839 Eric Christopher <echristo@redhat.com>
2840 Richard Sandiford <rsandifo@redhat.com>
2841
2842 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
2843 (bfd_mach_mips5500): New.
2844 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
2845 (arch_info_struct): Add corresponding entries here.
2846 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
2847 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
2848 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
2849 bfd_mach_mips5400 and bfd_mach_mips5500.
2850 (_bfd_mips_elf_mach_extends_p): New function.
2851 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
2852 the EF_MIPS_MACH flags.
2853 * bfd-in2.h: Regenerate.
2854
2855 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
2856
2857 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
2858 .got sections.
2859
2860 2002-09-28 Alan Modra <amodra@bigpond.net.au>
2861
2862 * elf.c (map_sections_to_segments): Correct test for start of
2863 writable section in the same page as end of read-only section.
2864
2865 2002-09-27 Matt Thomas <matt@3am-software.com>
2866
2867 * elf32-vax.c (elf_vax_check_relocs): Remove unused
2868 local_got_refcounts usage. Remove allocation of got slot.
2869 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
2870 Remove de-allocation of got slot.
2871 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
2872 traversal for elf_vax_instantiate_got_entries. Allow empty .got
2873 sections to be GC'ed.
2874 (elf_vax_instantiate_got_entries): New function.
2875 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
2876 tests that are now handled by elf_vax_instantiate_got_entries.
2877 Assert GOT entry falls within .got section size. Remove redundant
2878 comparisions. Fix comments.
2879
2880 2002-09-27 Jakub Jelinek <jakub@redhat.com>
2881
2882 * reloc.c: Add x86-64 TLS relocs.
2883 * bfd-in2.h, libbfd.h: Rebuilt.
2884 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
2885 relocs. Add TLS relocs.
2886 (x86_64_reloc_map): Add TLS relocs.
2887 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
2888 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
2889 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
2890 (elf64_x86_64_hash_entry): Define.
2891 (struct elf64_x86_64_obj_tdata): New.
2892 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
2893 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
2894 (link_hash_newfunc): Initialize tls_type.
2895 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
2896 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
2897 (elf64_x86_64_mkobject): New.
2898 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
2899 (elf64_x86_64_tls_transition): New.
2900 (elf64_x86_64_check_relocs): Add r_type variable and use it.
2901 Handle TLS relocs.
2902 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
2903 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
2904 (elf64_x86_64_size_dynamic_sections): Likewise.
2905 (dtpoff_base, tpoff): New.
2906 (elf64_x86_64_relocate_section): Handle TLS relocs.
2907 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
2908 entries.
2909 (bfd_elf64_mkobject): Define.
2910
2911 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
2912 DF_STATIC_TLS if shared.
2913
2914 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2915
2916 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
2917 empty relocation sections.
2918
2919 2002-09-26 Alan Modra <amodra@bigpond.net.au>
2920
2921 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
2922 (ppc64_elf_build_stubs): Build them here instead.
2923
2924 2002-09-24 Jakub Jelinek <jakub@redhat.com>
2925
2926 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
2927 addend into r_addend, not *r_offset.
2928 (elf32_sparc_finish_dynamic_symbol): Likewise.
2929 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
2930 R_SPARC_RELATIVE's r_offset.
2931
2932 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
2933
2934 * dwarf2.c (decode_line_info): Update to correctly decode
2935 the (non-standard DWARF2) out-of-order address sequences
2936 generated by the Intel C++ 6.0 compiler for ia64-Linux.
2937
2938 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
2939
2940 * config.bfd: For DJGPP targets, match with any cpu and any machine.
2941
2942 2002-09-23 Alan Modra <amodra@bigpond.net.au>
2943
2944 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
2945 for discarded FDEs. Remove redundant assignment.
2946 * elflink.h (elf_bfd_discard_info): Save edited relocs.
2947
2948 2002-09-22 H.J. Lu <hjl@gnu.org>
2949
2950 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
2951 the relocation count between different .reloc sections.
2952
2953 2002-09-21 Alan Modra <amodra@bigpond.net.au>
2954
2955 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
2956 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
2957 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
2958 R_PPC_EMB_RELSDA.
2959
2960 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
2961 unsigned. Move "symcount" assignment out of loop.
2962 * Makefile.am: Run "make dep-am".
2963 * Makefile.in: Regenerate.
2964 * configure: Regenerate.
2965 * po/SRC-POTFILES.in: Regnerate.
2966
2967 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
2968
2969 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
2970 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
2971 (e.g. IRIX64).
2972
2973 2002-09-19 Jakub Jelinek <jakub@redhat.com>
2974
2975 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
2976 even if generating R_PPC_RELATIVE reloc.
2977 (ppc_elf_relocate_section): Make sure relocation is performed
2978 if skip == -2. Clear memory at r_offset when creating dynamic
2979 relocation.
2980
2981 2002-09-19 Jakub Jelinek <jakub@redhat.com>
2982
2983 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
2984 BFD_RELOC_386_TLS_GOTIE): Add.
2985 * bfd-in2.h, libbfd.h: Rebuilt.
2986 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
2987 and R_386_TLS_GOTIE.
2988 (elf_i386_reloc_type_lookup): Handle it.
2989 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
2990 char instead of enum, change GOT_* into defines.
2991 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
2992 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
2993 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
2994 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
2995 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
2996 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
2997 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
2998 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
2999 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
3000 tls_type is GOT_TLS_IE_BOTH.
3001 (elf_i386_size_dynamic_sections): Likewise.
3002 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
3003 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
3004 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
3005 all 4 GOT_TLS_* TLS types.
3006
3007 2002-09-19 Nick Clifton <nickc@redhat.com>
3008
3009 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
3010 follow indirect links.
3011
3012 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
3013
3014 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
3015 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
3016 on 64 bit machines.
3017 (ecoff_swap_sym_in) <iss>: Likewise.
3018 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
3019 ECOFF information: 'ioptMax' refers to the actual *size*
3020 of the optimization symtab, not the number of entries.
3021
3022 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
3023
3024 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
3025 ELF_LINK_HASH_NEEDS_PLT logic.
3026
3027 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
3028
3029 * elfcode.h (elf_slurp_reloc_table_from_section): Check
3030 correct relocation count.
3031
3032 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
3033
3034 * bfd-in.h (bfd_get_dynamic_symcount): Define.
3035 * bfd.c (struct _bfd): Add dynsymcount.
3036 * bfd-in2.h: Regenerated.
3037 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
3038 abfd->dynsymcount.
3039 * elfcode.h (elf_slurp_reloc_table_from_section): Check
3040 for overflow.
3041
3042 2002-09-17 Stan Cox <scox@redhat.com>
3043
3044 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
3045 (mips_elf64_final_gp): Don't make up gp value.
3046 * elfn32-mips.c (mips_elf_final_gp): Likewise.
3047 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
3048 .MIPS.options/.options section.
3049
3050 2002-09-17 David O'Brien <obrien@FreeBSD.org>
3051
3052 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
3053 It is benign for FreeBSD < 4.1. Minor reformatting.
3054 * elf64-alpha-fbsd.c: Likewise.
3055
3056 2002-09-17 Jakub Jelinek <jakub@redhat.com>
3057
3058 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
3059 addend.
3060
3061 2002-09-17 Alan Modra <amodra@bigpond.net.au>
3062
3063 * elf64-alpha.c (alpha_elf_size_info): Make static.
3064
3065 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
3066
3067 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
3068 * cpu-tic4x.c: Ditto.
3069
3070 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3071
3072 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
3073 duplicate define.
3074
3075 2002-09-16 Bruno Haible <bruno@clisp.org>
3076
3077 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
3078 by a target variant implementation.
3079 * elf64-alpha.c: Likewise.
3080 * elf32-i386-fbsd.c: New file.
3081 * elf64-alpha-fbsd.c: New file.
3082 * targets.c: Support bfd_elf32_i386_freebsd_vec and
3083 bfd_elf64_alpha_freebsd_vec.
3084 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
3085 bfd_elf64_alpha_freebsd_vec.
3086 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
3087 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
3088 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
3089 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
3090 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
3091 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
3092 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
3093
3094 2002-09-12 Jakub Jelinek <jakub@redhat.com>
3095
3096 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
3097 NULL.
3098 (elf_i386_relocate_section): Return false after printing error about
3099 unresolvable relocation.
3100
3101 2002-09-12 Nick Clifton <nickc@redhat.com>
3102
3103 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
3104 R_ARM_THM_PC11.
3105
3106 2002-09-11 Jeffrey Law <law@redhat.com>
3107
3108 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
3109
3110 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
3111
3112 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
3113 line_ptr before deciding we've found a symbol.
3114
3115 2002-09-11 Nick Clifton <nickc@redhat.com>
3116
3117 * po/da.po: New Danish translation file.
3118 * configure.in (LINGUAS): Add 'da'.
3119 * configure: Regenerate.
3120
3121 2002-09-10 Michael Snyder <msnyder@redhat.com>
3122
3123 * irix-core.c (do_sections, do_sections64): New functions.
3124 (irix_core_core_file_p): Call new functions do_sections,
3125 do_sections64, depending on corefile (32-bit or 64-bit).
3126
3127 2002-09-09 Richard Henderson <rth@redhat.com>
3128
3129 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
3130 and PCREL21F like PCREL21B.
3131
3132 2002-09-04 Kevin Buettner <kevinb@redhat.com>
3133
3134 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
3135 vector.
3136
3137 2002-09-02 Nick Clifton <nickc@redhat.com>
3138
3139 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
3140 names instead of cryptically overloaded bfd_reloc error
3141 codes.
3142 (v850_elf_relocate_section): Likewise.
3143 (v850_elf_relax_section): Replace caching of external symbols
3144 with caching of internal symbols obtained from calling
3145 bfd_elf_get_elf_syms().
3146 Fixup problems with freeing cached allocated memory blocks.
3147
3148 2002-09-02 Alan Modra <amodra@bigpond.net.au>
3149
3150 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
3151 (bfd_pj_arch): Use bfd_default_scan.
3152 * cpu-v850.c (scan): Remove.
3153 (N): Use bfd_default_scan.
3154 * cpu-z8k.c (scan_mach): Remove.
3155 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
3156 first. Use bfd_default_scan.
3157
3158 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
3159 bfd_mach constants.
3160 (ecoff_get_magic): Likewise.
3161 * elf32-v850.c (v850_elf_object_p): Likewise.
3162 (v850_elf_final_write_processing): Likewise.
3163 * mipsbsd.c (MY(set_arch_mach)): Likewise.
3164 (MY(write_object_contents)): Likewise.
3165 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
3166 * coffcode.h (coff_write_object_contents): Likewise.
3167 (coff_set_arch_mach_hook): Add comment describing machine == 0.
3168 Remove unnecessary "machine" assignments.
3169 (coff_write_relocs): Test for the absolute section sym by testing
3170 section and flags.
3171
3172 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
3173 and bfd_mach_i386_i386_intel_syntax.
3174 * pdp11.c (NAME(aout,machine_type)): Likewise.
3175
3176 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
3177
3178 * bfd-in.h (align_power): Cast constants to bfd_vma type.
3179 * bfd-in2.h (align_power): Likewise.
3180
3181 2002-08-30 Alan Modra <amodra@bigpond.net.au>
3182
3183 * Makefile.am: Run "make dep-am".
3184 * Makefile.in: Regenerate.
3185
3186 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
3187 * cpu-powerpc.c (powerpc_compatible): Likewise.
3188 * cpu-rs6000.c (rs6000_compatible): Likewise.
3189
3190 2002-08-28 Catherine Moore <clm@redhat.com>
3191
3192 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
3193 (v850-elf-reloc): Don't resolve pc relative relocs.
3194 (v850_elf_ignore_reloc): New routine.
3195 (v850_elf_final_link_relocate): Handle new relocs.
3196 (v850_elf_relax_delete_bytes ): New routine.
3197 (v850_elf_relax_section): New routine.
3198 (bfd_elf32_bfd_relax_section): Define.
3199 (HOWTO): New entries for new relocs.
3200 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
3201 (BFD_RELOC_V850_LONGJUMP): New reloc.
3202 (BFD_RELOC_V850_ALIGN): New reloc.
3203 * archures.c: Remove redundant v850ea architecture.
3204 * cpu-v850.c: Remove redundant v850ea support.
3205 * libbfd.h: Regenerate.
3206 * bfd-in2.h: Regenerated.
3207
3208 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
3209
3210 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
3211 * configure.in: Add tic4x_coff vector files.
3212 * configure: Regenerate.
3213 * Makefile.am: Add tic4x target.
3214 * Makefile.in: Regenerate.
3215
3216 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
3217
3218 * archures.c: Add the BFD arch type tic4x.
3219 * bfd-in.h: Add BFD_IN_MEMORY flag.
3220 * coff-tic4x.c: New file.
3221 * coffswap.h (coff_swap_sym_out): Add preadjuster.
3222 * cpu-tic4x.c: New file.
3223 * targets.c: Added tic4x- in list of xvecs.
3224 * ticoff.h: New file.
3225 * bfd-in2.h: Regenerate.
3226
3227 2002-08-27 Adam Nemet <anemet@lnxw.com>
3228
3229 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
3230 bit of DT_INIT and DT_FINI for Thumb functions.
3231
3232 2002-08-26 Alan Modra <amodra@bigpond.net.au>
3233
3234 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
3235
3236 2002-08-26 Alan Modra <amodra@bigpond.net.au>
3237
3238 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
3239
3240 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3241
3242 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
3243 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
3244 Likewise.
3245 (struct elf_sh_pcrel_relocs_copied): Removed.
3246 (struct elf_sh_dyn_relocs): New.
3247 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
3248 field with dyn_relocs.
3249 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
3250 sections and sym_sec.
3251 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
3252 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
3253 (sh_elf_create_dynamic_sections): Use create_got_section instead
3254 of _bfd_elf_create_got_section.
3255 (sh_elf_check_relocs): Likewise.
3256 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
3257 sections.
3258 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
3259 sh_elf_relocate_section, sh_elf_check_relocs,
3260 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
3261 Likewise.
3262 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
3263 dynamic relocations and avoiding the copy relocation when we
3264 didn't find any dynamic relocations in the section which has
3265 contents or is read-only.
3266 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
3267 (sh_elf_size_dynamic_sections): Don't reset the size of
3268 .rela.got section even if dynamic_sections_created flag is off.
3269 Don't use sh_elf_discard_copies. Scan all input bfd and use
3270 allocate_dynrelocs. Call readonly_dynrelocs to determine
3271 whether we need DT_TEXTREL.
3272 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
3273 whether the symbol was never referred to.
3274 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
3275 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
3276 (sh_elf_check_relocs): Call create_got_section if the short-cut
3277 to .got is null. Increment reference counters only instead of
3278 allocating space on dynamic sections here. Don't conditionalize
3279 uninitialized got.offset value when marking the symbol as a
3280 global offset table entry. Keep relocations for symbols satisfied
3281 by a dynamic library to avoid copy relocations for the symbol.
3282 Set dynobj field of an elf hash table if needed.
3283 (sh_elf_finish_dynamic_sections): Handle null section pointer
3284 correctly.
3285 (elf_backend_copy_indirect_symbol): Defined.
3286 (elf_backend_can_refcount): Defined.
3287
3288 2002-08-23 Nick Clifton <nickc@redhat.com>
3289
3290 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
3291 previous change. Add comment explaining why.
3292
3293 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
3294
3295 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
3296 contents of .got.plt[2] to tr0, not address of .got.plt.
3297 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
3298 patching absolute plt entry. For shmedia plt entry, set bottom bit
3299 of branch to plt0 as this is a branch to an shmedia instruction.
3300 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
3301 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
3302 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
3303 branch to plt0.
3304 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
3305 patching absolute plt entry. For shmedia plt entry, branch to
3306 plt0 is now ptrel, so use relative offset. Set bottom bit of
3307 branch target as it is a branch to an shmedia instruction.
3308
3309 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
3310 Richard Shann <richard.shann@superh.com>
3311
3312 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
3313 value if .init is an SHmedia function. Similarly for DT_FINI.
3314 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
3315
3316 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
3317
3318 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
3319 dynamic section.
3320 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
3321
3322 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3323
3324 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
3325 byte read when reading the return address register column.
3326
3327 2002-08-22 Nick Clifton <nickc@redhat.com>
3328
3329 * config.bfd: Add powepc64-*-*bsd* target.
3330
3331 2002-08-22 Graeme Peterson <gp@qnx.com>
3332
3333 * Makefile.am: Add entries for elf32-shqnx.c
3334 * Makefile.in: Regenerate.
3335 * config.bfd: Add support sh-*-nto* target.
3336 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
3337 * configure: Regenerate.
3338 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
3339 * elf32-sh.c: Do not include elf32-target.h if
3340 ELF32_SH_C_INCLUDED is defined.
3341 * elf32-shqnx.c: New file: Support for QNX.
3342 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
3343
3344 2002-08-22 Nick Clifton <nickc@redhat.com>
3345
3346 * po/tr.po: Updated Turkish translation.
3347
3348 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
3349 symbols are not read.
3350
3351 2002-08-22 Alan Modra <amodra@bigpond.net.au>
3352
3353 * elf32-m68hc11.c: Formatting fixes.
3354 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
3355 * elf32-m68hc12.c: Formatting fixes.
3356 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
3357
3358 2002-08-22 Alan Modra <amodra@bigpond.net.au>
3359
3360 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
3361 SEC_DATA.
3362 (pmac_xcoff_vec): Likewise.
3363 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3364 (aix5coff64_vec): Likewise.
3365
3366 2002-08-22 Alan Modra <amodra@bigpond.net.au>
3367
3368 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
3369 param to elf_backend_copy_indirect_symbol.
3370 (_bfd_elf_link_hash_copy_indirect): Likewise.
3371 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
3372 calls to copy_indirect_symbol.
3373 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
3374 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
3375 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
3376 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3377 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
3378 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
3379 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
3380 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
3381 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
3382 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
3383 test refcounts for "used" values.
3384
3385 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
3386
3387 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
3388 argument declaration.
3389
3390 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
3391
3392 * archures.c (bfd_mach_ppc_e500): Added.
3393 * bfd-in2.h: Rebuilt.
3394 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
3395
3396 2002-08-19 Alan Modra <amodra@bigpond.net.au>
3397
3398 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
3399
3400 2002-08-17 Andrew Cagney <ac131313@redhat.com>
3401
3402 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
3403 `bfd_byte'.
3404
3405 2002-08-17 Stan Cox <scox@redhat.com>
3406
3407 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
3408 IRIX 6 segment layout for NEWABI.
3409
3410 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
3411
3412 * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
3413 symbols when looking for section referred to by a relocation.
3414 * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
3415
3416 2002-08-15 Alan Modra <amodra@bigpond.net.au>
3417
3418 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
3419
3420 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
3421
3422 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
3423 missing check for whether the symbol is referenced by DSO before
3424 unexporting it as an unneeded dynamic symbol.
3425
3426 2002-08-14 H.J. Lu <hjl@gnu.org>
3427
3428 * libbfd.h: Regenerate.
3429
3430 2002-08-14 H.J. Lu <hjl@gnu.org>
3431
3432 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
3433
3434 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
3435
3436 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
3437 instructions.
3438 (m68hc11_direct_relax): New to define table of relaxable instructions.
3439 (find_relaxable_insn): New, find a relaxable insn.
3440 (compare_reloc): New to compare two relocs.
3441 (m68hc11_elf_relax_section): New, relax text sections.
3442 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
3443 (elf32_m68hc11_check_relocs): New function for GC support.
3444 (elf32_m68hc11_relocate_section): New function for GC support.
3445 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
3446 (elf_backend_check_relocs): Likewise.
3447 (elf_backend_relocate_section): Likewise.
3448
3449 2002-08-13 H.J. Lu <hjl@gnu.org>
3450
3451 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
3452 definitions in shared objects when checking symbol with
3453 undefined version.
3454
3455 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3456
3457 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
3458 (elf32_m68hc11_gc_sweep_hook): Likewise.
3459 (elf_backend_gc_mark_hook): Define for GC section support.
3460 (elf_backend_gc_sweep_hook): Likewise.
3461 (elf_backend_can_gc_sections): Likewise.
3462
3463 * elf32-m68hc12.c: Likewise.
3464
3465 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3466
3467 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
3468 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
3469 (_bfd_m68hc11_elf_set_private_flags): New function.
3470 Use them to set/check/print ELF flags specific to 68HC11.
3471
3472 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
3473 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
3474 (_bfd_m68hc12_elf_set_private_flags): New function.
3475 Use them to set/check/print ELF flags specific to 68HC12.
3476
3477 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3478
3479 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
3480 fix masks for PC-rel relocs.
3481 (m68hc11_elf_ignore_reloc): New function.
3482
3483 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
3484 68HC12 banked addressing relocs.
3485 (m68hc12_phys_addr): New to compute physical address of banked memory.
3486 (m68hc12_phys_page): Likewise for page.
3487 (m68hc12_addr_is_banked): New to see if address is in banked area.
3488 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
3489
3490 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3491
3492 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
3493 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
3494 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
3495 * bfd-in2.h: Regenerate.
3496
3497 2002-08-12 H.J. Lu <hjl@gnu.org>
3498
3499 * elflink.h (elf_add_default_symbol): Preserve section across
3500 elf_merge_symbol.
3501
3502 2002-08-09 Graeme Peterson <gp@qnx.com>
3503
3504 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
3505 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
3506 * Makefile.in: Regenerate.
3507 * config.bfd: Add support for powerpc{le}-*-nto targets.
3508 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
3509 * configure: Regenerate.
3510 * elf32-i386qnx.c: Moved backend functions into a QNX specific
3511 common file "elf32-qnx.h", and now include that file.
3512 * elf32-qnx.h: New file: QNX specific common elf backend.
3513 * elf32-ppc.c: Do not include elf32-target.h if
3514 ELF32_PPC_C_INCLUDED is defined.
3515 * elf32-ppcqnx.c: New file: Support for QNX.
3516 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
3517 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
3518
3519 2002-08-09 Nick Clifton <nickc@redhat.com>
3520
3521 * po/sv.po: Updated Swedish translation.
3522
3523 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3524
3525 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
3526 g->global_gotsym is NULL.
3527
3528 2002-08-08 H.J. Lu <hjl@gnu.org>
3529
3530 * elflink.h (elf_add_default_symbol): Don't warn if a definition
3531 overrides an indirect versioned symbol.
3532
3533 2002-08-08 Jakub Jelinek <jakub@redhat.com>
3534
3535 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
3536 for R_386_TLS_TPOFF32 relocs against symndx 0.
3537
3538 2002-08-07 H.J. Lu <hjl@gnu.org>
3539
3540 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
3541 with undefined version if needed.
3542 (elf_link_assign_sym_version): Match a default symbol with a
3543 version without definition. No need to hide the default
3544 definition separately.
3545
3546 2002-08-08 Alan Modra <amodra@bigpond.net.au>
3547
3548 * elflink.h (elf_link_output_extsym): Don't output symbols from
3549 SEC_EXCLUDE sections.
3550
3551 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
3552
3553 2002-08-07 Alan Modra <amodra@bigpond.net.au>
3554
3555 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
3556 entries.
3557
3558 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3559
3560 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
3561 mismatch.
3562
3563 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3564
3565 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
3566
3567 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3568
3569 * elf32-mips.c (mips_reloc_map): Fix typo.
3570
3571 2002-08-06 Alan Modra <amodra@bigpond.net.au>
3572
3573 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
3574
3575 2002-08-06 Alan Modra <amodra@bigpond.net.au>
3576
3577 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
3578
3579 2002-08-06 Alan Modra <amodra@bigpond.net.au>
3580
3581 * libxcoff.h: Use PARAMS on function declarations.
3582 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
3583 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
3584
3585 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
3586 addend.
3587 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
3588
3589 2002-08-06 Alan Modra <amodra@bigpond.net.au>
3590
3591 * coff-rs6000.c: Formatting fixes.
3592 (xcoff_calculate_relocation): Use PARAMS in declaration.
3593 (xcoff_complain_overflow): Likewise.
3594 (xcoff_ppc_relocate_section): Use old-style function pointer call.
3595 (bfd_xcoff_backend_data): Remove useless comments.
3596 (rs6000coff_vec): Likewise.
3597 (bfd_pmac_xcoff_backend_data): Likewise.
3598 (pmac_xcoff_vec): Likewise.
3599
3600 * coff64-rs6000.c: Formatting fixes.
3601 (xcoff64_calculate_relocation): Use PARAMS in declaration.
3602 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
3603 (bfd_xcoff_backend_data): Remove useless comments.
3604 (rs6000coff64_vec): Likewise.
3605 (bfd_xcoff_aix5_backend_data): Likewise.
3606 (aix5coff64_vec): Likewise.
3607
3608 2002-08-06 Alan Modra <amodra@bigpond.net.au>
3609
3610 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
3611 mask entries. Use complain_overflow_dont for R_REF.
3612 (xcoff_reloc_type_ba): Revert last change.
3613 (xcoff_reloc_type_br): Likewise.
3614 (xcoff_reloc_type_crel): Likewise.
3615 (xcoff_ppc_relocate_section): Likewise.
3616 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
3617 (xcoff64_ppc_relocate_section): Likewise.
3618 (xcoff64_howto_table): Revert some of last change to mask entries.
3619 Use complain_overflow_dont for R_REF.
3620
3621 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
3622 relocs with bitsize == 16 have size = 1.
3623 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
3624 (xcoff_reloc_type_br): Likewise.
3625 (xcoff_reloc_type_crel): Likewise.
3626 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
3627 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
3628 dst_mask adjustment.
3629 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
3630 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
3631 bitsize == 16 have size = 1.
3632
3633 2002-08-01 Denis Chertykov <denisc@overta.ru>
3634
3635 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
3636 (struct misc): New field isymbuf. All free_* fields removed.
3637 (symbol_value): Pass in internal syms. No need to swap syms in.
3638 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
3639 possibly cached info.
3640 (tidyup_after_error): Removed.
3641 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
3642 misc. Use new field.
3643 (adjust_all_relocations): Use internal syms. No need to swap syms
3644 in and out.
3645 (add_page_insn): Don't use removed fields of struct misc.
3646
3647 2002-08-01 Nick Clifton <nickc@redhat.com>
3648
3649 * elf32-arm.h: Revert previous delta.
3650
3651 2002-08-01 Nick Clifton <nickc@redhat.com>
3652
3653 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
3654 * configure: Regenerate.
3655
3656 2002-07-31 H.J. Lu <hjl@gnu.org>
3657
3658 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
3659 selected.
3660
3661 2002-07-31 H.J. Lu <hjl@gnu.org>
3662
3663 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
3664 is selected.
3665
3666 2002-07-31 Jakub Jelinek <jakub@redhat.com>
3667
3668 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
3669 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
3670
3671 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
3672
3673 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
3674 There is no 8 byte relocation type for this architecture.
3675 (do_ns32k_reloc): Use bfd_vma instead of native types.
3676 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
3677 returns void.
3678 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
3679 rely on generic code to do that.
3680 * aout-ns32k.c (howto_table): Add appropriate overflow detection
3681 to all table entries.
3682 (_bfd_ns32k_relocate_contents): put_data returns void.
3683 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
3684 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
3685 return void.
3686
3687 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
3688
3689 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
3690 archive object is target dependant.
3691
3692 2002-07-31 Adam Nemet <anemet@lnxw.com>
3693
3694 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
3695 (THUMB_PLT_ENTRY_SIZE): New macro.
3696 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
3697 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
3698 ARM_PLT_ENTRY_SIZE.
3699 (elf32_arm_plt_entry): Likewise.
3700 (elf_backend_plt_header_size): Likewise.
3701 (elf32_thumb_plt0_entry): New global.
3702 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
3703 into .plt.thumb.
3704 (elf32_thumb_plt_entry): New global.
3705 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
3706 Thumb entries. Set the bottom bit of the corresponding GOT entry
3707 for a Thumb PLT entry.
3708 (struct elf32_arm_plt_entry_info): New structure.
3709 (struct elf32_arm_link_hash_entry, plt_info): New member of this
3710 type.
3711 (elf32_arm_link_hash_newfunc): Initialize new member.
3712 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
3713 relocations against the PLT.
3714 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
3715 first_rel_type if this is the first time we encounter the symbol.
3716 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
3717 Determine if relocation needs a PLT entry. Set first_rel_type if
3718 this is the first time we encounter the symbol
3719 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
3720 functions as well.
3721 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
3722 (elf32_arm_create_dynamic_sections): New function. Create the
3723 .plt.thumb section.
3724 (elf_backend_create_dynamic_sections): Call it.
3725
3726 2002-07-31 Nick Clifton <nickc@redhat.com>
3727
3728 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
3729 'alternative' in order to avoid shadowing global symbol of the
3730 same name.
3731 * bfd-in2.h: Regenerate.
3732 * libbfd.h: Regenerate.
3733 * libcoff.h: Regenerate.
3734
3735 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3736
3737 * Makefile.am: Add n32 ABI support.
3738 * Makefile.in: Regenerate.
3739 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
3740 bit vectors for mips*-*-linux targets as optional.
3741 * configure.in: Add n32 ABI vectors.
3742 * configure: Regenerate.
3743 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
3744 * elfn32-mips.c: New file, n32 ABI support.
3745 * targets.c: Add n32 ABI vectors.
3746
3747 2002-07-30 Graeme Peterson <gp@qnx.com>
3748
3749 * elfarmqnx-nabi.c: New file: Support for QNX.
3750 * config.bfd: Add support for arm-*-nto target.
3751 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
3752 * configure: Regenerate.
3753 * Makefile.am: Add entries for elfarmqnx-nabi.c.
3754 * Makefile.in: Regenerate.
3755 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
3756 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
3757 * elfarm-nabi.c: Do not include elf32-arm.h if
3758 ELFARM_NABI_C_INCLUDED is defined.
3759 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
3760
3761 2002-07-30 Nick Clifton <nickc@redhat.com>
3762
3763 * po/sv.po: Updated Swedish translation.
3764
3765 2002-07-30 Jakub Jelinek <jakub@redhat.com>
3766
3767 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
3768
3769 2002-07-30 Alan Modra <amodra@bigpond.net.au>
3770
3771 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
3772 * archive.c (bfd_generic_archive_p): Likewise.
3773 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
3774 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
3775 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
3776 (xcoff64_archive_p): Likewise.
3777 (xcoff64_openr_next_archived_file): Likewise.
3778 (xcoff64_archive_p): Clean up tdata properly on error.
3779 * coffgen.c (coff_real_object_p): Likewise.
3780 (coff_object_p): Release filehdr and opthdr.
3781 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
3782 * ieee.c (ieee_archive_p): Likewise.
3783 * ihex.c (ihex_object_p): Likewise.
3784 (ihex_mkobject): Always allocate tdata.
3785 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
3786 * srec.c (srec_mkobject): Always allocate tdata.
3787 (srec_object_p): Clean up tdata properly on error.
3788 (symbolsrec_object_p): Likewise.
3789 * versados.c (versados_object_p): Likewise.
3790 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
3791 and bfd_realloc instead of realloc.
3792 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
3793 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
3794 place of bfd_malloc, simplifying error freeing. Free hash table too.
3795 (vms_object_p): Clean up tdata on error.
3796 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
3797 (vms_close_and_cleanup): Adjust for bfd_alloc use.
3798
3799 2002-07-30 Alan Modra <amodra@bigpond.net.au>
3800
3801 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
3802
3803 2002-07-26 Chris Demetriou <cgd@broadcom.com>
3804
3805 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
3806 flags into resulting BFD.
3807
3808 2002-07-26 Alan Modra <amodra@bigpond.net.au>
3809
3810 From John Reiser <jreiser@BitWagon.com>
3811 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
3812 tls_ldm_got.refcount.
3813
3814 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3815
3816 * elf64-mips.c: Update TODO comment.
3817 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
3818 mips_elf64_gprel16_reloca): Remove prototypes.
3819 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
3820 (UNUSED_RELOC): Replace by EMPTY_RELOC.
3821 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
3822 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
3823 R_MIPS_HIGHEST.
3824 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
3825 R_MIPS_GOT16. Remove wrong comments.
3826 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
3827 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
3828 from elf32-mips.c.
3829 (mips_elf64_hi16_reloc): Fix formatting.
3830 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
3831 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
3832 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
3833 (mips_elf64_gprel16_reloc): Make static. Add check for
3834 partial_inplace.
3835 (mips_elf64_gprel16_reloca): Remove.
3836 (mips_elf64_literal_reloc): New function.
3837 (mips_elf64_gprel32_reloc): Fix formatting.
3838 (mips_elf64_shift6_reloc): Fix comment. Make static.
3839 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
3840 elf32-mips.c.
3841 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
3842 elf32-mips.c
3843 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
3844 specific relocations.
3845 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
3846 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
3847 (ELF_MAXPAGESIZE): Add comment.
3848
3849 2002-07-25 Nick Clifton <nickc@redhat.com>
3850
3851 * po/sv.po: Updated Swedish translation.
3852 * po/es.po: Updated Spanish translation.
3853 * po/fr.po: Updated French translation.
3854
3855 2002-07-25 Alan Modra <amodra@bigpond.net.au>
3856
3857 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
3858 as elf_link_record_local_dynamic_symbol.
3859 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
3860 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
3861 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
3862 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
3863 attempt is made to record a symbol in a discarded section, and
3864 return `2' in that case.
3865
3866 2002-07-24 Nick Clifton <nickc@redhat.com>
3867
3868 * po/sv.po: Updated Swedish translation.
3869 * po/es.po: Updated Spanish translation.
3870
3871 2002-07-23 Alan Modra <amodra@bigpond.net.au>
3872
3873 * po/SRC-POTFILES.in: Regenerate.
3874
3875 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
3876 immediately. Remove code handling relocatable linking.
3877 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
3878 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3879 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
3880 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
3881 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
3882 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3883 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
3884 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3885 * elf32-v850.c (v850_elf_relocate_section): Likewise.
3886 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3887 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3888 * elf32-avr.c (elf_backend_rela_normal): Define.
3889 * elf32-cris.c: Likewise.
3890 * elf32-fr30.c: Likewise.
3891 * elf32-frv.c: Likewise.
3892 * elf32-h8300.c: Likewise.
3893 * elf32-hppa.c: Likewise.
3894 * elf32-ip2k.c: Likewise.
3895 * elf32-sparc.c: Likewise.
3896 * elf32-v850.c: Likewise.
3897 * elf32-vax.c: Likewise.
3898 * elf64-hppa.c: Likewise.
3899 * elf64-sparc.c: Likewise.
3900 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
3901 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
3902 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
3903 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
3904 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3905 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
3906 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
3907 * elf-m10200.c (USE_RELA): Don't define.
3908 * elf-m10300.c: Likewise.
3909 * elfarm-oabi.c: Likewise.
3910 * elf32-i370.c: Likewise.
3911 * elf32-ip2k.c: Likewise.
3912 * elf32-m68k.c: Likewise.
3913 * elf32-mcore.c: Likewise.
3914 * elf32-ppc.c: Likewise.
3915 * elf32-s390.c: Likewise.
3916 * elf32-vax.c: Likewise.
3917 * elf64-ppc.c: Likewise.
3918 * elf64-s390.c: Likewise.
3919 * elf64-x86-64.c: Likewise.
3920 * elfxx-ia64.c: Likewise.
3921 * elf32-avr.c (USE_REL): Don't undef.
3922 * elf32-ip2k.c: Likewise.
3923
3924 2002-07-23 Nick Clifton <nickc@redhat.com>
3925
3926 * elf-bfd.h (struct elf_backend_data): Add new bitfield
3927 'want_p_paddr_set_to_zero'.
3928 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
3929 to false;
3930 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
3931 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
3932
3933 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
3934
3935 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
3936 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
3937 show the Copyright string.
3938 Minor formatting tidy ups.
3939
3940 2002-07-23 Nick Clifton <nickc@redhat.com>
3941
3942 * po/fr.po: Updated French translation.
3943 * po/sv.po: Updated Swedish translation.
3944
3945 2002-07-23 Alan Modra <amodra@bigpond.net.au>
3946
3947 * elflink.h (elf_link_input_bfd): Don't change internal symbols
3948 when outputting relocs.
3949
3950 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
3951
3952 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
3953 DT_PLTGOT into the dynamic section if there is a PLT.
3954
3955 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3956
3957 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
3958 elf32-mips.c.
3959 (_bfd_mips_elf_write_section): Likewise.
3960 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
3961 (_bfd_mips_elf_write_section): Likewise.
3962 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
3963 (elf32_mips_write_section): Likewise.
3964 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
3965 (_bfd_mips_elf_write_section): Likewise.
3966
3967 2002-07-19 Alan Modra <amodra@bigpond.net.au>
3968
3969 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
3970 PT_IA_64_UNWIND segments for a given section.
3971
3972 2002-07-17 H.J. Lu <hjl@gnu.org>
3973
3974 * Makefile.am: Fix a typo.
3975 * Makefile.in: Regenerate.
3976
3977 2002-07-15 Denis Chertykov <denisc@overta.ru>
3978 Frank Ch. Eigler <fche@redhat.com>
3979 Ben Elliston <bje@redhat.com>
3980 Alan Lehotsky <alehotsky@cygnus.com>
3981 John Healy <jhealy@redhat.com>
3982 Graham Stott <grahams@redhat.com>
3983 Jeff Johnston <jjohnstn@redhat.com>
3984
3985 * Makefile.am: Add support for ip2k.
3986 * Makefile.in: Regenerate.
3987 * doc/Makefile.in: Regenerate.
3988 * archures.c: Add support for ip2k.
3989 * config.bfd: Add support for ip2k.
3990 * configure.in: Add support for ip2k.
3991 * configure: Regenerate.
3992 * reloc.c: Add support for ip2k.
3993 * targets.c: Add support for ip2k.
3994 * bfd-in2.h: Regenerate.
3995 * libbfd.h: Regenerate.
3996 * cpu-ip2k.c: New file.
3997 * elf32-ip2k.c: New file.
3998
3999 2002-07-17 Ian Rickards <irickard@arm.com>
4000
4001 * dwarf2.c (concat_filename): If we can't establish the directory
4002 just return the filename.
4003
4004 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
4005
4006 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
4007
4008 2002-07-16 Alan Modra <amodra@bigpond.net.au>
4009
4010 * elflink.h: Formatting fixes, tidy prototypes.
4011 (elf_link_assign_sym_version): Move common code out of loop.
4012
4013 2002-07-16 Alan Modra <amodra@bigpond.net.au>
4014
4015 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
4016 reloc section size is zero. Correct reloc output location.
4017
4018 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
4019
4020 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
4021 the final type for the e_fsel selector when generating PA2.0W code.
4022 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
4023 relocations.
4024
4025 2002-07-14 H.J. Lu <hjl@gnu.org>
4026
4027 * elflink.h (elf_link_assign_sym_version): Hide the default
4028 definition if there is a hidden versioned definition.
4029
4030 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
4031
4032 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
4033 dynamic reference test in assertion when initializing GOT with
4034 static contents. Just assert that there are either no dynamic
4035 sections, the symbol is defined in the regular objects or that the
4036 symbol is undef weak. Tweak comment.
4037 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
4038 only if the symbol isn't defined in the program and isn't undef
4039 weak.
4040 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
4041 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
4042 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
4043 (elf_cris_discard_excess_program_dynamics): Don't consider
4044 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
4045
4046 2002-07-11 Alan Modra <amodra@bigpond.net.au>
4047
4048 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
4049 unresolved debugging relocs in dynamic applications.
4050 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4051 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4052 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4053 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4054 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4055 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4056
4057 2002-07-10 Alan Modra <amodra@bigpond.net.au>
4058
4059 * elf64-ppc.c (ONES): Define.
4060 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
4061 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
4062 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
4063
4064 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
4065 (ppc64_elf_set_private_flags): Delete.
4066 (ppc64_elf_section_from_shdr): Delete.
4067 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
4068 (ppc64_elf_fake_sections): Delete.
4069 (bfd_elf64_bfd_set_private_flags): Don't define.
4070 (bfd_elf64_get_symbol_info): Likewise.
4071 (elf_backend_section_from_shdr): Likewise.
4072 (elf_backend_fake_sections): Likewise.
4073
4074 2002-07-10 Marco Walther <Marco.Walther@sun.com>
4075
4076 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
4077 when not already set.
4078 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
4079 (elf_backend_fake_sections): Define.
4080
4081 2002-07-10 Alan Modra <amodra@bigpond.net.au>
4082
4083 * merge.c (_bfd_merge_section): Remove redundant output_section check.
4084 Formatting.
4085 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
4086
4087 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
4088
4089 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
4090 NULL sym_hashes to just before use.
4091 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
4092 symbol with non-default visibility.
4093 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
4094 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
4095 Ditto.
4096 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
4097 symbol with non-default visibility.
4098 (cris_elf_check_relocs): At tests for local symbol before
4099 increasing h->plt.refcount, also check for non-default
4100 visibility. Ditto when checking for local symbol to eliminate
4101 pc-relative runtime relocs.
4102
4103 2002-07-08 Alan Modra <amodra@bigpond.net.au>
4104
4105 * elf.c: Formatting.
4106 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
4107 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
4108 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
4109 segments.
4110
4111 2002-07-07 Mark Mitchell <mark@codesourcery.com>
4112 Alan Modra <amodra@bigpond.net.au>
4113
4114 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
4115 account the impact of relocation count overflow when computing
4116 section offsets.
4117 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
4118 or not to apply the PE COFF reloc overflow handling. Fix a
4119 fencepost error in deciding whether or not to use that technique.
4120
4121 2002-07-07 Alan Modra <amodra@bigpond.net.au>
4122
4123 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
4124 change type of locsyms.
4125 (bfd_elf_get_elf_syms): Declare.
4126 * elf.c (bfd_elf_get_elf_syms): New function.
4127 (group_signature): Use bfd_elf_get_elf_syms.
4128 (bfd_section_from_r_symndx): Likewise.
4129 * elfcode.h (elf_slurp_symbol_table): Likewise.
4130 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
4131 (elf_link_add_object_symbols): Likewise. Reorganise to increase
4132 locality of various data structures. Properly free internal relocs.
4133 (elf_bfd_final_link): Properly free internal relocs.
4134 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
4135 (elf_link_input_bfd): Likewise.
4136 (elf_gc_mark): Likewise. Properly free internal relocs.
4137 (elf_gc_sweep): Properly free internal relocs.
4138 (elf_reloc_symbol_deleted_p): No need to swap syms in.
4139 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
4140 internal relocs.
4141 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
4142 Properly free possibly cached info.
4143 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
4144 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
4145 symbol swapping code.
4146 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
4147 Properly free possibly cached info.
4148 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
4149 (mn10300_elf_relax_delete_bytes): Likewise.
4150 (mn10300_elf_symbol_address_p): Likewise.
4151 (mn10300_elf_get_relocated_section_contents): Likewise.
4152 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
4153 (elf32_h8_relax_delete_bytes): Likewise.
4154 (elf32_h8_symbol_address_p): Likewise.
4155 (elf32_h8_get_relocated_section_contents): Likewise.
4156 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
4157 (m32r_elf_relax_delete_bytes): Likewise.
4158 (m32r_elf_get_relocated_section_contents): Likewise.
4159 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
4160 elf_section_data to determine whether cached.
4161 (sh_elf_relax_section): As above for elf-m10200.c.
4162 (sh_elf_relax_delete_bytes): Likewise.
4163 (sh_elf_get_relocated_section_contents): Likewise.
4164 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
4165 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
4166 reading of local syms.
4167 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
4168 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
4169 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
4170 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
4171 relocs.
4172 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
4173 free internal relocs and section contents. Don't read symbols.
4174 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
4175 (elf32_hppa_size_stubs): Don't free local syms.
4176 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
4177 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
4178 possibly cached info.
4179 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
4180 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
4181 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
4182 all_local_syms.
4183 (get_local_syms): Delete function.
4184 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
4185 on exit.
4186 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
4187
4188 2002-07-05 Jim Wilson <wilson@redhat.com>
4189
4190 * syms.c (decode_section_type): New.
4191 (bfd_decode_symclass): Call decode_section_type.
4192
4193 2002-07-04 Jakub Jelinek <jakub@redhat.com>
4194
4195 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
4196 section content start.
4197 Reported by Michael Schumacher <mike@hightec-rt.com>.
4198
4199 2002-07-04 Alan Modra <amodra@bigpond.net.au>
4200
4201 * section.c (_bfd_strip_section_from_output): Remove unnecessary
4202 link order code. Don't actually remove the output section here;
4203 Just set a flag for the linker to do so.
4204 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
4205 sections when setting up output section dynsyms.
4206
4207 2002-07-04 Alan Modra <amodra@bigpond.net.au>
4208
4209 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
4210 fudge.
4211 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
4212 libs here instead.
4213
4214 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
4215
4216 * elf64-s390.c (create_got_section): Set .got section alignment to
4217 8 bytes.
4218 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
4219
4220 2002-07-02 Alan Modra <amodra@bigpond.net.au>
4221
4222 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
4223
4224 2002-07-01 Matt Thomas <matt@3am-software.com>
4225
4226 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
4227 to EF_VAX_*.
4228
4229 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4230
4231 * elfxx-mips.c (ABI_64_P): Fix comment.
4232 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
4233 new section names for N64 ABI.
4234 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
4235 (mips_elf_calculate_relocation): Code formatting.
4236 (mips_elf_create_dynamic_relocation): Likewise.
4237 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
4238 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
4239 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
4240 in any NewABI.
4241 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
4242 for NewABI.
4243 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
4244 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
4245 here, too.
4246
4247 2002-07-01 Andreas Schwab <schwab@suse.de>
4248
4249 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
4250 R_X86_64_64 to R_X86_64_RELATIVE.
4251
4252 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
4253
4254 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
4255 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
4256 Run "make dep-am".
4257 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
4258 host_aout_vec.
4259 * configure.in (vaxbsd_vec): Add.
4260 * targets.c (vaxbsd_vec): Add.
4261 * Makefile.in: Rebuild.
4262 * configure: Rebuild.
4263 * po/SRC-POTFILES.in: Rebuild.
4264
4265 2002-07-01 Alan Modra <amodra@bigpond.net.au>
4266
4267 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
4268 examining to gc_mark_hook, rather than the bfd.
4269 (elf_gc_sections): Adjust.
4270 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
4271 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
4272 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
4273 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
4274 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
4275 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
4276 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
4277 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
4278 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
4279 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
4280 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
4281 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
4282 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
4283 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
4284 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
4285 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
4286 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
4287 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
4288 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
4289 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
4290 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
4291 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
4292 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
4293 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
4294 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
4295 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
4296 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
4297 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
4298 redundant local sym tests.
4299 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
4300 (link_hash_newfunc): Init is_entry.
4301 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
4302 (ppc64_elf_link_hash_table_create): Init all_local_syms.
4303 (create_linkage_sections): Use bfd_make_section_anyway rather than
4304 bfd_make_section.
4305 (ppc64_elf_mark_entry_syms): New function.
4306 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
4307 up opd entry to function section map.
4308 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
4309 relocs that reference the opd section.
4310 (edit_opd): New function.
4311 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
4312 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
4313 (get_local_syms): Do so here. Exit if we already have local syms.
4314 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
4315 read local syms on non-ELF input.
4316 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
4317 than duplicating it's function here. Adjust free of internal
4318 relocs to suit.
4319 (ppc64_elf_relocate_section): Adjust local syms in opd section.
4320 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
4321 * elf32-hppa.c (elf32_hppa_size_stubs): Call
4322 _bfd_elf32_link_read_relocs rather than duplicating it's function
4323 here. Adjust free of internal relocs to suit.
4324
4325 2002-07-01 Andreas Jaeger <aj@suse.de>
4326
4327 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
4328 are not allowed in shared libs code, enforce -fPIC.
4329
4330 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
4331
4332 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
4333 trailing zero-sequences when there's previous left-over data.
4334
4335 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
4336
4337 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
4338 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
4339 and opd_rel_sec in order for starting rela section. Check _raw_size.
4340 (elf_backend_reloc_type_class): Define.
4341
4342 2002-06-27 Kevin Buettner <kevinb@redhat.com>
4343
4344 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
4345 DWARF2 formats.
4346
4347 2002-06-27 Alan Modra <amodra@bigpond.net.au>
4348
4349 * cpu-powerpc.c: Comment on ordering of arch_info.
4350 * elf32-ppc.c (ppc_elf_object_p): New function.
4351 (elf_backend_object_p): Define.
4352 * elf64-ppc.c (ppc64_elf_object_p): New function.
4353 (elf_backend_object_p): Define.
4354
4355 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
4356
4357 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
4358 * configure: Regenerate.
4359
4360 2002-06-25 Jason Eckhardt <jle@rice.edu>
4361
4362 * dwarf2.c (decode_line_info): Check unit->addr_size
4363 to read in the proper number of prologue bytes.
4364
4365 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
4366
4367 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
4368 aix5coff64_vec if 64-bit bfd support has been enabled.
4369 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
4370 been enabled.
4371
4372 * targets.c (_bfd_target_vector[]): Only include
4373 aix5coff64_vec if 64-bit bfd support has been enabled.
4374
4375 2002-06-25 Alan Modra <amodra@bigpond.net.au>
4376
4377 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
4378 * elf32-hppa.c (hppa_add_stub): Likewise.
4379 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
4380 * elflink.h (elf_add_default_symbol): Fix comment typo.
4381 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
4382 (elf_link_add_object_symbols): Likewise.
4383 (elf_link_assign_sym_version): Likewise.
4384 * hash.c (bfd_hash_lookup): Likewise.
4385 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
4386 * section.c (bfd_get_unique_section_name): Likewise.
4387 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
4388 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
4389 (assign_section_numbers): Likewise.
4390 (_bfd_elfcore_make_pseudosection): Likewise.
4391 (elfcore_grok_lwpstatus): Likewise.
4392 (elfcore_grok_win32pstatus): Likewise.
4393 (elfcore_write_note): Constify input params. Use PTR instead of
4394 void *. Include terminating NUL in namesz. Correct padding.
4395 Support NULL "name" param. Use memcpy instead of strcpy.
4396 (elfcore_write_prpsinfo): Constify input params.
4397 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
4398 (elfcore_write_lwpstatus): Likewise.
4399 (elfcore_write_pstatus): Likewise.
4400 (elfcore_write_prfpreg): Likewise.
4401 (elfcore_write_prxfpreg): Likewise.
4402 * elf-bfd.h (elfcore_write_note): Update declaration.
4403 (elfcore_write_prpsinfo): Likewise.
4404 (elfcore_write_prstatus): Likewise.
4405 (elfcore_write_pstatus): Likewise.
4406 (elfcore_write_prfpreg): Likewise.
4407 (elfcore_write_prxfpreg): Likewise.
4408 (elfcore_write_lwpstatus): Likewise.
4409
4410 2002-06-25 Jason Eckhardt <jle@rice.edu>
4411
4412 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
4413 symbols of type stProc and stStaticProc.
4414
4415 2002-06-25 Nick Clifton <nickc@redhat.com>
4416
4417 * ecoff.c: VArious formatting fixes.
4418
4419 2002-06-25 Alan Modra <amodra@bigpond.net.au>
4420
4421 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
4422
4423 2002-06-25 Alan Modra <amodra@bigpond.net.au>
4424
4425 * aout-adobe.c: Don't compare against "true" or "false.
4426 * aout-target.h: Likewise.
4427 * aoutx.h: Likewise.
4428 * archive.c: Likewise.
4429 * bout.c: Likewise.
4430 * cache.c: Likewise.
4431 * coff-a29k.c: Likewise.
4432 * coff-alpha.c: Likewise.
4433 * coff-i386.c: Likewise.
4434 * coff-mips.c: Likewise.
4435 * coff-or32.c: Likewise.
4436 * coff64-rs6000.c: Likewise.
4437 * coffcode.h: Likewise.
4438 * coffgen.c: Likewise.
4439 * cpu-ns32k.c: Likewise.
4440 * ecoff.c: Likewise.
4441 * ecofflink.c: Likewise.
4442 * elf.c: Likewise.
4443 * elf32-arm.h: Likewise.
4444 * elf32-cris.c: Likewise.
4445 * elf32-d30v.c: Likewise.
4446 * elf32-i386.c: Likewise.
4447 * elf32-mcore.c: Likewise.
4448 * elf32-ppc.c: Likewise.
4449 * elf32-sh.c: Likewise.
4450 * elf32-sh64.c: Likewise.
4451 * elf32-v850.c: Likewise.
4452 * elf64-alpha.c: Likewise.
4453 * elf64-sh64.c: Likewise.
4454 * elfcode.h: Likewise.
4455 * elfcore.h: Likewise.
4456 * elflink.h: Likewise.
4457 * elfxx-mips.c: Likewise.
4458 * i386os9k.c: Likewise.
4459 * ieee.c: Likewise.
4460 * libbfd.c: Likewise.
4461 * linker.c: Likewise.
4462 * mmo.c: Likewise.
4463 * nlm32-alpha.c: Likewise.
4464 * nlm32-i386.c: Likewise.
4465 * nlm32-ppc.c: Likewise.
4466 * nlm32-sparc.c: Likewise.
4467 * nlmcode.h: Likewise.
4468 * oasys.c: Likewise.
4469 * pdp11.c: Likewise.
4470 * peicode.h: Likewise.
4471 * reloc.c: Likewise.
4472 * som.c: Likewise.
4473 * srec.c: Likewise.
4474 * tekhex.c: Likewise.
4475 * vms.c: Likewise.
4476 * xcofflink.c: Likewise.
4477 * elf64-sparc.c: Edit comment to not use "== false".
4478
4479 * aoutf1.h: Don't use "? true : false".
4480 * ecoff.c: Likewise.
4481 * format.c: Likewise.
4482 * ieee.c: Likewise.
4483 * linker.c: Likewise.
4484 * mmo.c: Likewise.
4485 * oasys.c: Likewise.
4486
4487 2002-06-23 H.J. Lu <hjl@gnu.org>
4488
4489 * elflink.h (elf_link_add_archive_symbols): For the default
4490 version, check references with only one `@' first.
4491
4492 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
4493
4494 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
4495 function.
4496 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
4497 symbol table.
4498 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
4499 (elf64_hppa_size_dynamic_sections): Revise to use
4500 elf64_hppa_mark_milli_and_exported_functions.
4501 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
4502 symbols out of dynamic symbol table.
4503
4504 2002-06-23 Alan Modra <amodra@bigpond.net.au>
4505
4506 * Makefile.in: Regenerate.
4507 * libbfd.h: Regenerate.
4508 * bfd-in2.h: Regenerate.
4509 * configure: Regenerate.
4510 * po/SRC-POTFILES.in: Regenerate.
4511
4512 * elflink.h: Comment typo fixes.
4513
4514 2002-06-23 H.J. Lu <hjl@gnu.org>
4515
4516 * elf-bfd.h (elf_link_loaded_list): New structure.
4517 (elf_link_hash_table): Add "loaded".
4518 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
4519 * elflink.h (elf_link_check_versioned_symbol): New function.
4520 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
4521
4522 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
4523
4524 * elflink.h (size_dynamic_sections): If the target does not
4525 support an ELF style hash table, return true, indicating that
4526 nothing needed to be done, rather than false, indicating that the
4527 section's size could not be computed.
4528
4529 2002-06-18 Dave Brolley <brolley@redhat.com>
4530
4531 From Catherine Moore, Michael Meissner, Dave Brolley:
4532 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
4533 * targets.c: Support bfd_elf32_frv_vec.
4534 * reloc.c: Add FRV relocs.
4535 * configure.in: Add support for bfd-elf32-frv-vec.
4536 * config.bfd (targ_cpu): Add support for frv-*-elf.
4537 * archures.c: Add frv arch and machines.
4538 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
4539 (ALL_MACHINES_CFILES): Add cpu-frv.c.
4540 (BFD32_BACKENDS): Add elf32-frv.lo.
4541 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
4542 (cpu-frv.lo): New target.
4543 (elf32-frv.lo): New target.
4544 * cpu-frv.c: New file.
4545 * elf32-frv.c: New file.
4546
4547 2002-06-18 Jakub Jelinek <jakub@redhat.com>
4548
4549 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
4550 e_shnum == 0.
4551 Only read the first section header if e_shoff is non-zero.
4552 Don't consider e_shstrndx if there are no sections.
4553
4554 2002-06-17 Tom Rix <trix@redhat.com>
4555
4556 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
4557 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
4558 complain_overflow_bitfield.
4559
4560 2002-06-17 Alan Modra <amodra@bigpond.net.au>
4561
4562 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
4563 (bfd_fdopenr): Likewise.
4564 (bfd_openstreamr): Likewise.
4565 (bfd_openw): Likewise.
4566
4567 * targets.c: Sort target vecs.
4568 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
4569 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
4570 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
4571 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
4572 * configure.in: Sort target vecs. Add m88kmach3_vec.
4573 * configure: Regenerate.
4574
4575 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
4576
4577 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
4578 bpo_reloc_no to break sort order ties, not address of items.
4579
4580 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
4581
4582 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
4583 Skip excluded sections in determing __gp value.
4584 (elf_hppa_final_link_relocate): Use the symbol's address in
4585 R_PARISC_FPTR64 relocations that don't need an opd entry.
4586 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
4587 (elf64_hppa_finalize_dynreloc): Likewise.
4588 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
4589 (elf64_hppa_finish_dynamic_symbol): Break up assert.
4590
4591 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
4592
4593 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
4594 alignment for .bss, .data and .text sections so that sse and sse2
4595 code will work.
4596 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4597
4598 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
4599
4600 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
4601 sh[1234]*-elf*.
4602
4603 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
4604
4605 * elflink.h (elf_bfd_final_link): Improve error handling for missing
4606 dynamic sections.
4607
4608 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
4609 for a symbol that has no output section.
4610 (allocate_dynrel_entries): Correct comment.
4611 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
4612 unless we want one.
4613 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
4614 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
4615 with no section. Remove unnecessary parentheses.
4616
4617 2002-06-11 Tom Rix <trix@redhat.com>
4618
4619 * coffcode.h (coff_compute_section_file_positions): Add data
4620 section to AIX loader alignment check.
4621
4622 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
4623 alignment to 4 bytes.
4624 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
4625 power accessor macro.
4626 (do_shared_object_padding): Remove invalid assertion.
4627
4628 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
4629
4630 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
4631 for removed output sections.
4632
4633 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
4634
4635 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
4636 htab_alloc.
4637 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
4638
4639 2002-06-08 H.J. Lu <hjl@gnu.org>
4640
4641 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
4642 work around a long long bug in gcc 2.96 on mips.
4643
4644 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
4645
4646 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
4647 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
4648 Regenerate dependency lists.
4649 * Makefile.in: Regenerate.
4650 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
4651 vax1knetbsd_vec to targ_selvecs.
4652 * configure.in: Add vax1knetbsd_vec.
4653 * configure: Regenerate.
4654 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
4655 * vax1knetbsd.c: New file.
4656 * vaxnetbsd.c: Update copyright years.
4657 (TARGET_PAGE_SIZE): Set to 0x1000.
4658 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
4659
4660 2002-06-08 Matt Thomas <matt@3am-software.com>
4661
4662 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
4663
4664 2002-06-08 Alan Modra <amodra@bigpond.net.au>
4665
4666 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
4667
4668 2002-06-08 Alan Modra <amodra@bigpond.net.au>
4669
4670 * Makefile.am: Run "make dep-am".
4671 * Makefile.in: Regenerate.
4672
4673 * armnetbsd.c: Replace CONST with const.
4674 * corefile.c: Likewise.
4675 * elf32-dlx.c: Likewise.
4676 * elf64-mips.c: Likewise.
4677 * mmo.c: Likewise.
4678 * ns32knetbsd.c: Likewise.
4679
4680 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
4681 table is elf64-sparc.
4682
4683 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4684
4685 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
4686 Fix RELA addends to get not shifted in the result. Don't do special
4687 handling of R_MIPS_64 for NewABI.
4688
4689 2002-06-07 Alan Modra <amodra@bigpond.net.au>
4690
4691 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
4692 (NAME(aout,slurp_reloc_table)): Likewise.
4693 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
4694 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
4695 (xcoff_write_archive_contents_big): Likewise.
4696 (xcoff_generate_rtinit): Likewise.
4697 (xcoff_generate_rtinit): Likewise, and check error return.
4698 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
4699 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
4700 (coff_get_normalized_symtab): Likewise.
4701 (coff_make_empty_symbol): Likewise.
4702 (bfd_coff_set_symbol_class): Likewise.
4703 * cofflink.c (coff_link_add_symbols): Likewise.
4704 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
4705 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
4706 (bfd_ecoff_write_accumulated_debug): Likewise.
4707 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
4708 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
4709 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
4710 * ieee.c (do_with_relocs): Use bfd_zalloc.
4711 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
4712 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
4713 (NAME(aout,slurp_reloc_table)): Likewise.
4714 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
4715 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
4716 * som.c (som_build_and_write_symbol_table): Likewise.
4717 (som_slurp_string_table): Likewise.
4718 (som_slurp_symbol_table): Likewise.
4719 (som_bfd_ar_write_symbol_stuff): Likewise.
4720 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
4721 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
4722 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
4723 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
4724 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
4725
4726 2002-06-07 Alan Modra <amodra@bigpond.net.au>
4727
4728 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
4729 "group" union.
4730 (elf_group_name): Update.
4731 (elf_group_id): Define.
4732 (bfd_elf_set_group_contents): Declare.
4733 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
4734 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
4735 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
4736 that sym for the signature.
4737 (_bfd_elf_compute_section_file_positions): Don't call
4738 set_group_contents for "ld -r" case.
4739 (swap_out_syms): Use bfd_zalloc.
4740 * elflink.h (elf_link_add_archive_symbols): Likewise.
4741 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
4742 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
4743
4744 2002-06-07 Alan Modra <amodra@bigpond.net.au>
4745
4746 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
4747 relocs in opd for non-shared too.
4748
4749 2002-06-06 Jeffrey Law <law@redhat.com>
4750
4751 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
4752 relocations.
4753
4754 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
4755
4756 * merge.c: Include libiberty.h.
4757 * elf-strtab.c: Include libiberty.h.
4758
4759 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
4760
4761 * peXXigen.c (pe_print_idata): Remove unused variable.
4762
4763 2002-06-06 David Heine <dlheine@tensilica.com>
4764
4765 * elf.c (assign_file_positions_for_segments): Remove unallocated
4766 sections from the section to segment mapping for PT_LOAD segments.
4767 Update comment about empty loadable segments.
4768
4769 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
4770
4771 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
4772 is within the .stabstr section.
4773
4774 2002-06-06 Alan Modra <amodra@bigpond.net.au>
4775
4776 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
4777 are "const PTR", not "const PTR *".
4778 (bfd_elf32_swap_symbol_in): Likewise.
4779 (bfd_elf64_swap_symbol_in): Likewise.
4780 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
4781 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
4782 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
4783 (elf_link_add_object_symbols): Likewise.
4784 (elf_link_record_local_dynamic_symbol): Likewise.
4785 (elf_link_input_bfd): Likewise.
4786 (elf_gc_mark): Likewise.
4787 (elf_reloc_symbol_deleted_p): Likewise.
4788 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
4789 (mn10200_elf_relax_delete_bytes): Likewise.
4790 (mn10200_elf_symbol_address_p): Likewise.
4791 (mn10200_elf_get_relocated_section_contents): Likewise.
4792 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
4793 (mn10300_elf_relax_section): Likewise.
4794 (mn10300_elf_relax_delete_bytes): Likewise.
4795 (mn10300_elf_symbol_address_p): Likewise.
4796 (mn10300_elf_get_relocated_section_contents): Likewise.
4797 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4798 (elf32_h8_relax_delete_bytes): Likewise.
4799 (elf32_h8_symbol_address_p): Likewise.
4800 (elf32_h8_get_relocated_section_contents): Likewise.
4801 * elf32-hppa.c (get_local_syms): Likewise.
4802 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
4803 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
4804 * elf32-sh.c (sh_elf_relax_section): Likewise.
4805 (sh_elf_relax_delete_bytes): Likewise.
4806 (sh_elf_get_relocated_section_contents): Likewise.
4807 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
4808 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
4809 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
4810 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
4811 * elf64-ppc.c (get_local_syms): Likewise.
4812 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
4813 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
4814
4815 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
4816
4817 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
4818
4819 2002-06-05 Alan Modra <amodra@bigpond.net.au>
4820
4821 * elf.c (group_signature): Swap in the whole symbol, and handle
4822 extracting section symbol names.
4823 (setup_group): Add comment.
4824 (set_group_contents): When called from objcopy or ld, arrange for
4825 section contents to be written. Write group member output section
4826 indices to allow objcopy to reorganize sections.
4827 (_bfd_elf_copy_private_section_data): Copy group info.
4828
4829 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
4830 (bfd_elf32_swap_symbol_in): Update prototype.
4831 (bfd_elf64_swap_symbol_in): Likewise.
4832 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
4833 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
4834 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
4835 (elf_link_add_object_symbols): Likewise.
4836 (elf_link_record_local_dynamic_symbol): Likewise.
4837 (elf_link_input_bfd): Likewise.
4838 (elf_gc_mark): Likewise.
4839 (elf_reloc_symbol_deleted_p): Likewise.
4840 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
4841 (mn10200_elf_relax_delete_bytes): Likewise.
4842 (mn10200_elf_symbol_address_p): Likewise.
4843 (mn10200_elf_get_relocated_section_contents): Likewise.
4844 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
4845 (mn10300_elf_relax_section): Likewise.
4846 (mn10300_elf_relax_delete_bytes): Likewise.
4847 (mn10300_elf_symbol_address_p): Likewise.
4848 (mn10300_elf_get_relocated_section_contents): Likewise.
4849 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4850 (elf32_h8_relax_delete_bytes): Likewise.
4851 (elf32_h8_symbol_address_p): Likewise.
4852 (elf32_h8_get_relocated_section_contents): Likewise.
4853 * elf32-hppa.c (get_local_syms): Likewise.
4854 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
4855 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
4856 * elf32-sh.c (sh_elf_relax_section): Likewise.
4857 (sh_elf_relax_delete_bytes): Likewise.
4858 (sh_elf_get_relocated_section_contents): Likewise.
4859 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
4860 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
4861 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
4862 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
4863 * elf64-ppc.c (get_local_syms): Likewise.
4864 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
4865 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
4866 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
4867 * elf64-alpha.c (alpha_elf_size_info): Likewise.
4868 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
4869 * elf64-mips.c (mips_elf64_size_info): Likewise.
4870 * elf64-s390.c (s390_elf64_size_info): Likewise.
4871 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
4872
4873 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4874
4875 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
4876 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
4877 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
4878 _bfd_mips_elf_ignore_discarded_relocs.
4879 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
4880
4881 2002-06-05 H.J. Lu <hjl@gnu.org>
4882
4883 * elfxx-mips.c (mips_elf_calculate_relocation): Call
4884 _bfd_elf_rel_local_sym for STT_SECTION relocations against
4885 the SEC_MERGE section.
4886
4887 2002-06-05 Alan Modra <amodra@bigpond.net.au>
4888
4889 * coff-alpha.c: Update copyright date.
4890 * coff-mips.c: Likewise.
4891 * xcoff-target.h: Likewise.
4892
4893 * bfd-in.h: Remove "taken from the source" comment.
4894 * libbfd-in.h: Likewise.
4895 * libcoff-in.h: Likewise.
4896 * bfd-in2.h: Regenerate.
4897 * libbfd.h: Regenerate.
4898 * libcoff.h: Regenerate.
4899
4900 * elf.c (bfd_elf_discard_group): Return true.
4901 * elf-bfd.h (bfd_elf_discard_group): Declare.
4902 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
4903 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
4904 * bfd.c (bfd_discard_group): Define.
4905 * targets.c (struct bfd_target): Add _bfd_discard_group.
4906 (BFD_JUMP_TABLE_LINK): Here too.
4907 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
4908 * aout-adobe.c (aout_32_bfd_discard_group): Define.
4909 * aout-target.h (MY_bfd_discard_group): Define.
4910 * aout-tic30.c (MY_bfd_discard_group): Define.
4911 * binary.c (binary_bfd_discard_group): Define.
4912 * bout.c (b_out_bfd_discard_group): Define.
4913 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
4914 * coffcode.h (coff_bfd_discard_group): Define.
4915 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
4916 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
4917 * i386msdos.c (msdos_bfd_discard_group): Define.
4918 * i386os9k.c (os9k_bfd_discard_group): Define.
4919 * ieee.c (ieee_bfd_discard_group): Define.
4920 * ihex.c (ihex_bfd_discard_group): Define.
4921 * mmo.c (mmo_bfd_discard_group): Define.
4922 * nlm-target.h (nlm_bfd_discard_group): Define.
4923 * oasys.c (oasys_bfd_discard_group): Define.
4924 * ppcboot.c (ppcboot_bfd_discard_group): Define.
4925 * som.c (som_bfd_discard_group): Define.
4926 * srec.c (srec_bfd_discard_group): Define.
4927 * tekhex.c (tekhex_bfd_discard_group): Define.
4928 * versados.c (versados_bfd_discard_group): Define.
4929 * vms.c (vms_bfd_discard_group): Define.
4930 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
4931 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
4932 (aix5coff64_vec): Likewise.
4933 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
4934
4935 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
4936
4937 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
4938 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
4939 (elf32-sh64-com.lo): New dependency list.
4940 * Makefile.in: Regenerate.
4941 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
4942 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
4943 elf32-sh64-com.lo.
4944 * configure: Regenerate.
4945 * elf32-sh64.c (sh64_address_in_cranges)
4946 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
4947 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
4948 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
4949 * elf32-sh64-com.c: ...here. New file.
4950
4951 2002-06-04 Alan Modra <amodra@bigpond.net.au>
4952
4953 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
4954 ATTRIBUTE_UNUSED on used params.
4955 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
4956 before calling bfd_section_from_elf_index on local syms.
4957 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
4958
4959 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
4960
4961 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
4962 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
4963 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
4964 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
4965 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
4966 * Makefile.in: Regenerate.
4967 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
4968 (sh64-*-netbsd*): New targets.
4969 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
4970 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
4971 * configure: Regenerate.
4972 * elf32-sh64-nbsd.c: New file.
4973 * elf64-sh64-nbsd.c: New file.
4974 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
4975 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
4976 bfd_elf64_sh64lnbsd_vec.
4977
4978 2002-06-04 Alan Modra <amodra@bigpond.net.au>
4979
4980 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
4981 (bfd_section_from_shdr): Likewise. Set section name of group
4982 sections from signature.
4983 (group_signature): Split out from setup_group. Ensure symbol table
4984 is available.
4985 (bfd_elf_discard_group): New function.
4986 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
4987 .gnu.linkonce* sections if they are members of a group.
4988 (set_group_contents): Set GRP_COMDAT flag.
4989 * section.c (bfd_discard_group): New function.
4990 * bfd-in.h (bfd_elf_discard_group): Declare.
4991 * bfd-in2.h: Regenerate.
4992 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
4993 (elf_linkonce_p): Define.
4994
4995 2002-06-04 Alan Modra <amodra@bigpond.net.au>
4996
4997 * elf.c (bfd_section_from_shdr): Make "name" const.
4998 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
4999 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
5000 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
5001 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
5002 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
5003 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
5004 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
5005 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
5006 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
5007 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
5008 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
5009
5010 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5011
5012 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
5013 ABI.
5014
5015 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
5016
5017 * elf32-arc.c: Fix formatting.
5018 * elf32-arm.h: Likewise.
5019 * elf32-cris.c: Likewise.
5020 * elf32-dlx.c: Likewise.
5021 * elf32-hppa.c: Likewise.
5022 * elf32-i386.c: Likewise.
5023 * elf32-i386qnx.c: Likewise.
5024 * elf32-or32.c: Likewise.
5025 * elf32-s390.c: Likewise.
5026 * elf32-sh64.c: Likewise.
5027 * elf32-vax.c: Likewise.
5028 * elf32-xstormy16.c: Likewise.
5029 * elf64-alpha.c: Likewise.
5030 * elf64-mmix.c: Likewise.
5031 * elf64-ppc.c: Likewise.
5032 * elf64-s390.c: Likewise.
5033 * elf64-sh64.c: Likewise.
5034 * elf64-x86-64.c: Likewise.
5035
5036 2002-06-02 Richard Henderson <rth@redhat.com>
5037
5038 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
5039 null when there are no got entries for a symbol.
5040 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
5041 uninitialized variable warning.
5042
5043 2002-06-01 Richard Henderson <rth@redhat.com>
5044
5045 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
5046 undefined symbols here.
5047 (elf64_alpha_relax_section): Do it here. Also test for not
5048 defined in the current module.
5049 (elf64_alpha_relocate_section_r): Split out of ...
5050 (elf64_alpha_relocate_section): ... here. Don't dereference
5051 NULL when looking up local got entries.
5052
5053 2002-06-01 Richard Henderson <rth@redhat.com>
5054
5055 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
5056 symbols from JSR relaxation.
5057 (elf64_alpha_size_plt_section_1): New.
5058 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
5059 (elf64_alpha_size_rela_got_1): ... here.
5060 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
5061 (elf64_alpha_size_rela_got_section): ... here.
5062 (elf64_alpha_size_plt_section): New.
5063 (elf64_alpha_relax_section): Call them.
5064 (elf64_alpha_size_got_sections): Remove output_bfd arg.
5065 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
5066
5067 2002-06-01 Richard Henderson <rth@redhat.com>
5068
5069 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
5070 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
5071 in shared libraries. Fix DTPRELHI and TPRELHI value.
5072 (INSN_ADDQ, INSN_RDUNIQ): New.
5073 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
5074 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
5075 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
5076 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
5077 Handle GOTDTPREL and GOTTPREL relocations.
5078 (elf64_alpha_relax_gprelhilo): New.
5079 (elf64_alpha_relax_tls_get_addr): New.
5080 (elf64_alpha_relax_find_tls_segment): New.
5081 (elf64_alpha_relax_section): Handle TLS relocations.
5082 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
5083 (elf64_alpha_check_relocs): Set it.
5084
5085 2002-06-01 Richard Henderson <rth@redhat.com>
5086
5087 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
5088
5089 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
5090 check; don't suppress dynamic relocs for non-allocated sections.
5091
5092 * elf64-alpha.c: Remove dead code.
5093
5094 2002-05-31 Alan Modra <amodra@bigpond.net.au>
5095
5096 * bfd-in2.h: Regenerate.
5097 * libbfd.h: Regenerate.
5098 * po/SRC-POTFILES.in: Regenerate.
5099
5100 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
5101 space for bss .plt.
5102
5103 2002-05-31 Graeme Peterson <gp@qnx.com>
5104
5105 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
5106 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
5107 Run "make dep-am".
5108 * Makefile.in: Regenerate.
5109 * config.bfd: Add i[3456]86-*-nto-qnx* support.
5110 * configure.in: Add bfd_elf32_i386qnx_vec support.
5111 * configure: Regenerate.
5112 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
5113 is_contained_by_filepos, and copy_private_bfd_data_p.
5114 * elf.c (assign_file_positions_for_segments): Call backend
5115 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
5116 (IS_CONTAINED_BY_FILEPOS): Define.
5117 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
5118 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
5119 Fix non-K&R call to _bfd_error_handler.
5120 (_bfd_elf_copy_private_section_data): Use backend
5121 copy_private_bfd_data_p.
5122 * elf32-i386.c: Don't include elfxx-target.h when
5123 ELF32_I386_C_INCLUDED is defined.
5124 * elf32-i386qnx.c: New QNX elf backend file.
5125 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
5126 elf_backend_is_contained_by_filepos, and
5127 elf_backend_do_copy_private_bfd_data.
5128 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
5129
5130 2002-05-31 Alan Modra <amodra@bigpond.net.au>
5131
5132 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
5133 Move other similar defines to start of file.
5134
5135 2002-05-30 Tom Rix <trix@redhat.com>
5136
5137 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
5138 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
5139
5140 2002-05-30 Richard Henderson <rth@redhat.com>
5141
5142 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
5143 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
5144 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
5145 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
5146 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
5147 (struct alpha_elf_obj_tdata): Rename total_got_entries and
5148 n_local_got_entries to total_got_size and local_got_size.
5149 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
5150 (alpha_got_entry_size): New.
5151 (elf64_alpha_relax_with_lituse): Use it.
5152 (elf64_alpha_relax_without_lituse): Likewise.
5153 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
5154 (get_got_entry): New.
5155 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
5156 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
5157 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
5158 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
5159 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
5160 (elf64_alpha_calc_got_offsets): Likewise.
5161 (alpha_dynamic_entries_for_reloc): New.
5162 (elf64_alpha_calc_dynrel_sizes): Use it.
5163 (elf64_alpha_size_dynamic_sections): Likewise.
5164 (elf64_alpha_relocate_section): Handle TLS relocations.
5165 * reloc.c: Add Alpha TLS relocations.
5166 * bfd-in2.h, libbfd.h: Rebuild.
5167
5168 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
5169
5170 * peXXigen.c (pe_print_idata): Remove double printed
5171 import table lines; add Bound-To comment.
5172
5173 2002-05-29 Matt Thomas <matt@3am-software.com>
5174
5175 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
5176 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
5177 (elf32-vax.lo): New rule.
5178 * Makefile.in: Regenerate.
5179 * configure.in (bfd_elf32_vax_vec)
5180 (vaxnetbsd_vec): New vectors.
5181 * configure: Regenerate.
5182 * config.bfd (vax-*-netbsdelf*)
5183 (vax-*-netbsdaout*)
5184 (vax-*-netbsd*): New targets.
5185 * elf32-vax.c: New file.
5186 * reloc.c: Add VAX relocations.
5187 * bfd-in2.h: Regenerate.
5188 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
5189
5190 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
5191
5192 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
5193 and bfd_elf32_bigarm_vec to targ_selvecs.
5194
5195 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
5196
5197 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
5198 with auto-imported symbols.
5199
5200 2002-05-29 Adam Nemet <anemet@lnxw.com>
5201
5202 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
5203 sections only record bfd.
5204 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
5205 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
5206 * bfd-in2.h: Regenerate.
5207
5208 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
5209
5210 * syms.c (_bfd_stab_section_find_nearest_line): Move
5211 declaration and initialisation of saw_line and saw_func out of
5212 for loop.
5213
5214 2002-05-29 Alan Modra <amodra@bigpond.net.au>
5215
5216 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
5217 (bfd_elf64_get_symbol_info): Define.
5218 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
5219
5220 2002-05-29 Andrey Volkov <avolkov@transas.com>
5221
5222 * cpu-h8300.c: Make default h8300 machine first in machine list.
5223
5224 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
5225
5226 * config.bfd: Added DLX configuraton.
5227 * Makefile.am: Added DLX configuraton.
5228 * configure.in: Added DLX configuraton.
5229 * archures.c: Add DLX architecure.
5230 * reloc.c: Add DLX relocs.
5231 * targets.c: Added DLX target vector.
5232 * configure: Regenerate.
5233 * Makefile.in: Regenreate.
5234 * bfd-in2.h: Regenreate.
5235 * elf32-dlx.c: New file: Support DLX target.
5236 * cpu-dlx.c: New file: Support DLX target.
5237
5238 2002-05-25 Alan Modra <amodra@bigpond.net.au>
5239
5240 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
5241
5242 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
5243 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
5244 strings to point inside function code sym string.
5245 (func_desc_adjust): Likewise.
5246 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
5247
5248 2002-05-24 Michal Ludvig <mludvig@suse.cz>
5249
5250 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
5251 (elf64_x86_64_grok_psinfo): Added.
5252
5253 2002-05-24 TAMURA Kent <kent@netbsd.org>
5254
5255 * config.bfd: Add a target for i386-netbsdpe.
5256
5257 2002-05-24 Alan Modra <amodra@bigpond.net.au>
5258
5259 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
5260 and is_func_descriptor.
5261 (func_desc_adjust): Hide function code sym in shared libs unless
5262 there is a matching exported function descriptor sym.
5263
5264 2002-05-23 Jakub Jelinek <jakub@redhat.com>
5265
5266 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
5267 for symbols from SHF_TLS section.
5268 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
5269 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
5270 (map_sections_to_segments): Build PT_TLS segment if necessary.
5271 (assign_file_positions_for_segments): Likewise.
5272 (get_program_header_size): Account for PT_TLS segment.
5273 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
5274 SEC_THREAD_LOCAL sections to STT_TLS.
5275 * reloc.c: Add 386 and IA-64 TLS relocs.
5276 * section.c (SEC_THREAD_LOCAL): Define.
5277 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
5278 Remove.
5279 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
5280 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
5281 unconditionally.
5282 (struct elf_final_link_info): Add first_tls_sec.
5283 (elf_bfd_final_link): Set first_tls_sec.
5284 Compute elf_hash_table (info)->tls_segment.
5285 (elf_link_output_extsym): Handle STT_TLS symbols.
5286 (elf_link_input_bfd): Likewise.
5287 * syms.c (BSF_THREAD_LOCAL): Define.
5288 * bfd-in2.h: Rebuilt.
5289 * libbfd.h: Rebuilt.
5290 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
5291 elf_i386_mkobject, elf_i386_object_p): New functions.
5292 (elf_howto_table): Add TLS relocs.
5293 (elf_i386_reloc_type_lookup): Support TLS relocs.
5294 (elf_i386_info_to_howto_rel): Likewise.
5295 (struct elf_i386_link_hash_entry): Add tls_type.
5296 (struct elf_i386_obj_tdata): New.
5297 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
5298 New macros.
5299 (struct elf_i386_link_hash_table): Add tls_ldm_got.
5300 (link_hash_newfunc): Clear tls_type.
5301 (elf_i386_check_relocs): Support TLS relocs.
5302 (elf_i386_gc_sweep_hook): Likewise.
5303 (allocate_dynrelocs): Likewise.
5304 (elf_i386_size_dynamic_sections): Likewise.
5305 (elf_i386_relocate_section): Likewise.
5306 (elf_i386_finish_dynamic_symbol): Likewise.
5307 (bfd_elf32_mkobject, elf_backend_object_p): Define.
5308 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
5309 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
5310 want_tprel, want_dtpmod, want_dtprel.
5311 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
5312 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
5313 R_IA64_LTOFF_TPREL22.
5314 (elf_code_to_howto_index): Add TLS relocs.
5315 (elfNN_ia64_check_relocs): Support TLS relocs.
5316 (allocate_global_data_got): Account for TLS .got data.
5317 (allocate_dynrel_entries): Account for TLS dynamic relocations.
5318 (elfNN_ia64_install_value): Supprt TLS relocs.
5319 (set_got_entry): Support TLS relocs.
5320 (elfNN_ia64_relocate_section): Likewise.
5321
5322 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
5323
5324 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
5325 BLX reloc round the relocation up rather than down.
5326 * coff-arm.c (coff_arm_relocate_section): Likewise.
5327
5328 2002-05-21 H.J. Lu (hjl@gnu.org)
5329
5330 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
5331 definition.
5332
5333 2002-05-22 Alan Modra <amodra@bigpond.net.au>
5334
5335 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
5336 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
5337
5338 2002-05-22 Alan Modra <amodra@bigpond.net.au>
5339
5340 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
5341 unresolved relocs.
5342 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
5343
5344 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5345
5346 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
5347 non-ELF targets.
5348
5349 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5350
5351 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
5352 an error value.
5353 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
5354 return with false on error.
5355 (elf_link_input_bfd): Check reloc_emitter return value.
5356
5357 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
5358
5359 * config.bfd (armeb-*-netbsdelf*): New target.
5360
5361 2002-05-20 Alan Modra <amodra@bigpond.net.au>
5362
5363 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
5364 at the plt call stub.
5365
5366 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5367
5368 * cpu-mips.c (mips_compatible): Don't try to check machine
5369 compatibility.
5370
5371 2002-05-18 Tom Rix <trix@redhat.com>
5372
5373 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
5374
5375 2002-05-17 Alan Modra <amodra@bigpond.net.au>
5376
5377 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
5378 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
5379 we've already warned about an undefined symbol. Report more
5380 detail on reloc errors.
5381
5382 2002-05-17 Alan Modra <amodra@bigpond.net.au>
5383
5384 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
5385 * configure.in: Invoke AM_INSTALL_LIBBFD.
5386 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
5387 (install_libbfd): .. New target.
5388 (uninstall_libbfd): Likewise.
5389 (install-bfdlibLTLIBRARIES): Likewise.
5390 (uninstall-bfdlibLTLIBRARIES): Likewise.
5391 (bfdlibdir): New.
5392 (bfdincludedir): New.
5393 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
5394 * aclocal.m4: Regenerate.
5395 * configure: Regenerate.
5396 * Makefile.in: Regenerate.
5397
5398 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
5399
5400 * hash.c (bfd_hash_lookup): Remove computation of len from inside
5401 hash loop.
5402
5403 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
5404
5405 * config.bfd: Add targets for sh64-linux (little endian and
5406 big endian).
5407
5408 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
5409
5410 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
5411 is located in the same section as the import table. Instead
5412 check, and if necessary load the section containing the thunk.
5413
5414 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
5415
5416 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
5417 bfd_bread.
5418 (xcoff64_core_file_matches_executable_p): Replace bfd_read
5419 with bfd_bread.
5420
5421 2002-05-15 Alan Modra <amodra@bigpond.net.au>
5422
5423 * aix5ppc-core.c: Warning fixes.
5424 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
5425 * aout-target.h (MY_bfd_link_just_syms): Define.
5426 * aout-tic30.c (MY_bfd_link_just_syms): Define.
5427 * bfd.c (bfd_link_just_syms): Define.
5428 * binary.c (binary_bfd_link_just_syms): Define.
5429 * bout.c (b_out_bfd_link_just_syms): Define.
5430 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
5431 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
5432 * coffcode.h (coff_bfd_link_just_syms): Define.
5433 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
5434 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
5435 (_bfd_elf_link_just_syms): Declare.
5436 * elf.c (_bfd_elf_link_just_syms): New function.
5437 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
5438 sections haven't already been discarded by the linker.
5439 * elflink.h (elf_link_add_object_symbols): Likewise for stab
5440 sections and SEC_MERGE sections.
5441 (elf_bfd_discard_info): Similarly here.
5442 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
5443 * i386msdos.c (msdos_bfd_link_just_syms): Define.
5444 * i386os9k.c (os9k_bfd_link_just_syms): Define.
5445 * ieee.c (ieee_bfd_link_just_syms): Define.
5446 * ihex.c (ihex_bfd_link_just_syms): Define.
5447 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
5448 (_bfd_generic_link_just_syms): Declare.
5449 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
5450 * linker.c (_bfd_generic_link_just_syms): New function.
5451 * mmo.c (mmo_bfd_link_just_syms): Define.
5452 * nlm-target.h (nlm_bfd_link_just_syms): Define.
5453 * oasys.c (oasys_bfd_link_just_syms): Define.
5454 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
5455 * som.c (som_bfd_link_just_syms): Define.
5456 * srec.c (srec_bfd_link_just_syms): Define.
5457 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
5458 (BFD_JUMP_TABLE_LINK): And here.
5459 * tekhex.c (tekhex_bfd_link_just_syms): Define.
5460 * versados.c (versados_bfd_link_just_syms): Define.
5461 * vms.c (vms_bfd_link_just_syms): Define.
5462 * libbfd.h: Regenerate.
5463 * bfd-in2.h: Regenerate.
5464
5465 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5466
5467 * elf32-mips.c: Remove superfluous definitions copied from
5468 elfxx-mips.c.
5469 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
5470 SGIish vectors to check the special case.
5471 (mips_elf_hi16_reloc): Fix comment.
5472 (mips_elf_got16_reloc): Likewise.
5473 (_bfd_mips_elf32_gprel16_reloc): Likewise.
5474 (elf_reloc_map): Code cleanup.
5475 (mips_reloc_map): Add comment.
5476 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
5477 (mips_elf32_rtype_to_howto): Likewise.
5478 (mips_elf32_discard_info): Likewise.
5479 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
5480 lead to IRIX compatibility now.
5481
5482 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5483
5484 * elfxx-mips.c: Call it IRIX, not Irix in comments.
5485
5486 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
5487
5488 * config.bfd (shle-*-netbsdelf*): Add target which includes
5489 sh64 support.
5490
5491 2002-05-13 David Edelsohn <edelsohn@gnu.org>
5492
5493 * configure.in: Revert 2002-04-07. Instead, auto-configure
5494 HAVE_ST_C_IMPL.
5495 * configure: Regenerate.
5496 * config.in: Regenerate.
5497 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
5498 or AIX_5_CORE.
5499
5500 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
5501
5502 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
5503 corefiles as well.2
5504 * configure: Regenerate.
5505
5506 2002-05-13 Alan Modra <amodra@bigpond.net.au>
5507
5508 * Makefile.am (install-data-local): Install headers to
5509 $(exec_prefix)/include.
5510 * Makefile.in: Regenerate.
5511
5512 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
5513 Daniel Jacobowitz <drow@mvista.com>
5514
5515 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
5516 map BFD_RELOC_RVA.
5517
5518 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
5519
5520 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
5521 hppa*-*-openbsd*): New targets.
5522 * configure.in (alpha*-*-openbsd*): Set COREFILE.
5523 * configure: Regenerate.
5524
5525 2002-05-10 Tom Rix <trix@redhat.com>
5526
5527 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
5528 xcoff64_ppc_relocate_section.
5529 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
5530 * libxcoff.h: Common xcoff_reloc_type function declaration.
5531
5532 2002-05-10 Alan Modra <amodra@bigpond.net.au>
5533
5534 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
5535 added in 2002-05-09 commit.
5536
5537 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
5538 don't look for stubs on all undefined syms.
5539
5540 2002-05-09 Alan Modra <amodra@bigpond.net.au>
5541
5542 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
5543 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
5544 pcrel_offset.
5545
5546 * elf32-i386.c (elf_howto_table): Comments.
5547 (elf_i386_relocate_section): Handle more relocs for relocatable
5548 linking and against SEC_MERGE sections.
5549
5550 2002-05-08 Alan Modra <amodra@bigpond.net.au>
5551
5552 * elf32-ppc.c (ppc_elf_create_got): New function.
5553 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
5554 _bfd_elf_create_dynamic_sections. Correct .plt flags.
5555 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
5556 _bfd_elf_create_got_section.
5557
5558 2002-05-07 Alan Modra <amodra@bigpond.net.au>
5559
5560 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
5561 * elfxx-target.h (elf_backend_rela_normal): Define.
5562 (elfNN_bed): Init rela_normal.
5563 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
5564 for section symbols here if rela_normal. Simplify abs section test.
5565 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
5566 return immediately. Remove code handling relocatable linking.
5567 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
5568 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5569 * elf32-i370.c (i370_elf_relocate_section): Likewise.
5570 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5571 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5572 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5573 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5574 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5575 * elf32-s390.c (elf_s390_relocate_section): Likewise.
5576 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5577 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
5578 * elf64-s390.c (elf_s390_relocate_section): Likewise.
5579 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5580 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
5581 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
5582 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5583 * elf-m10200.c (elf_backend_rela_normal): Define.
5584 * elf-m10300.c (elf_backend_rela_normal): Define.
5585 * elf32-fr30.c (elf_backend_rela_normal): Define.
5586 * elf32-i370.c (elf_backend_rela_normal): Define.
5587 * elf32-i860.c (elf_backend_rela_normal): Define.
5588 * elf32-m68k.c (elf_backend_rela_normal): Define.
5589 * elf32-mcore.c (elf_backend_rela_normal): Define.
5590 * elf32-openrisc.c (elf_backend_rela_normal): Define.
5591 * elf32-ppc.c (elf_backend_rela_normal): Define.
5592 * elf32-s390.c (elf_backend_rela_normal): Define.
5593 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
5594 * elf64-ppc.c (elf_backend_rela_normal): Define.
5595 * elf64-s390.c (elf_backend_rela_normal): Define.
5596 * elf64-x86-64.c (elf_backend_rela_normal): Define.
5597 * elfxx-ia64.c (elf_backend_rela_normal): Define.
5598 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
5599 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
5600
5601 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
5602
5603 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
5604 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
5605
5606 2002-05-06 Alan Modra <amodra@bigpond.net.au>
5607
5608 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
5609 when not relocatable. Fix reloc_emitter call for K&R.
5610
5611 2002-05-04 Alan Modra <amodra@bigpond.net.au>
5612
5613 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
5614 reloading local sym addend mistakenly removed in 2002-05-01 change.
5615
5616 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
5617 (read_abbrevs): Change "offset" param to bfd_vma.
5618 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
5619 Change "abbrev_offset" to bfd_vma.
5620 (read_indirect_string): Use correct conversion chars in error
5621 message format string, cast bfd_vma's to unsigned long.
5622 (read_abbrevs): Likewise.
5623 (read_attribute_value): Likewise.
5624 (decode_line_info): Likewise.
5625 (scan_unit_for_functions): Likewise.
5626 (parse_comp_unit): Likewise.
5627
5628 2002-05-04 Tom Rix <trix@redhat.com>
5629
5630 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
5631 (coff_swap_reloc_out): Same.
5632 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
5633 (xcoff_swap_reloc_out): Same.
5634 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
5635 case some 16 bit relocs. Add reloc value to output.
5636 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
5637 R_RBR. Improve names.
5638 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
5639 (bfd_xcoff_backend_data): Update with new reloc swap names.
5640 (bfd_pmac_xcoff_backend_data) : Same.
5641 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
5642 (xcoff64_swap_reloc_out): Same.
5643 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
5644 R_POS. Add reloc value to output.
5645 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
5646 bit R_RBR. Improve names, masks.
5647 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
5648 (bfd_xcoff_backend_data): Update with new reloc swap names.
5649 (bfd_xcoff_aix5_backend_data) : Same.
5650
5651 2002-05-04 Alan Modra <amodra@bigpond.net.au>
5652
5653 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
5654 bfd_count top_index, input_list, all_local_syms.
5655 (elf32_hppa_setup_section_lists): New function, split from
5656 elf32_hppa_size_stubs.
5657 (elf32_hppa_next_input_section): Likewise.
5658 (group_sections): Likewise.
5659 (get_local_syms): Likewise.
5660 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
5661 stubs on undefined syms too.
5662 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
5663 Only access htab elf fields when we have an elf hash table.
5664 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
5665 (elf32_hppa_next_input_section): Declare.
5666
5667 2002-05-04 Bob Byrnes <byrnes@curl.com>
5668
5669 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
5670 _bfd_new_bfd.
5671
5672 2002-05-03 H.J. Lu (hjl@gnu.org)
5673
5674 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
5675 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
5676 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
5677 to hide a global symbol.
5678 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
5679 forced_local to true.
5680
5681 2002-05-02 Richard Henderson <rth@redhat.com>
5682
5683 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
5684 vs SHN_UNDEF to zero.
5685
5686 2002-05-02 Alan Modra <amodra@bigpond.net.au>
5687
5688 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
5689 16 bit reloc.
5690 <R_PPC64_SECTOFF_DS>: Likewise.
5691 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
5692 SECTOFF reloc.
5693 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
5694 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
5695 SECTOFF reloc.
5696
5697 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
5698 (ppc64_elf_ha_reloc): New function.
5699 (ppc64_elf_brtaken_reloc): New function.
5700 (ppc64_elf_sectoff_reloc): New function.
5701 (ppc64_elf_sectoff_ha_reloc): New function.
5702 (ppc64_elf_toc_reloc): New function.
5703 (ppc64_elf_toc_ha_reloc): New function.
5704 (ppc64_elf_toc64_reloc): New function.
5705 (ppc64_elf_unhandled_reloc): New function.
5706 (ppc64_elf_howto_raw): Use the above.
5707 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
5708 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
5709 <R_PPC64_SECTOFF_DS>: Likewise.
5710 (IS_ABSOLUTE_RELOC): Update.
5711 (struct ppc_link_hash_table): Add have_undefweak.
5712 (ppc64_elf_link_hash_table_create): Init.
5713 (func_desc_adjust): Set have_undefweak.
5714 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
5715 add the .sfpr blr when have_undefweak.
5716 (ppc64_elf_setup_section_lists): Check hash table flavour.
5717 (ppc64_elf_next_input_section): Move output_section->owner test to
5718 ppc64elf.em.
5719 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
5720 and relocatable test. Return TOCstart and don't set elf_gp.
5721 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
5722 offset calculation. Add assert on weak sym branch tweaks.
5723 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
5724 (ppc64_elf_toc): Declare.
5725 (ppc64_elf_next_input_section): Update.
5726
5727 2002-05-01 Alan Modra <amodra@bigpond.net.au>
5728
5729 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
5730 file_name.
5731
5732 2002-05-01 Alan Modra <amodra@bigpond.net.au>
5733
5734 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
5735 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
5736 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
5737 call branches. Correct undefined weak destination.
5738 (ppc64_elf_func_desc_adjust): Always create at least one blr in
5739 .sfpr, and correct case where either only savef* or restf* is
5740 needed.
5741
5742 Long branch stubs, multiple stub sections.
5743 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
5744 (ppc64_elf_next_input_section): Declare.
5745 * elf64-ppc.c: Move linker-only prototypes.
5746 (STUB_SUFFIX): Define.
5747 (enum ppc_stub_type): New.
5748 (struct ppc_stub_hash_entry): New.
5749 (struct ppc_branch_hash_entry): New.
5750 (struct ppc_link_hash_entry): Add stub_cache, oh.
5751 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
5752 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
5753 Rename plt_overflow to stub_error.
5754 (ppc_stub_hash_lookup): Define.
5755 (ppc_branch_hash_lookup): Define.
5756 (stub_hash_newfunc): New function.
5757 (branch_hash_newfunc): New function.
5758 (link_hash_newfunc): Init new fields.
5759 (ppc64_elf_link_hash_table_create): Likewise.
5760 (ppc64_elf_link_hash_table_free): New function.
5761 (ppc_stub_name): New function.
5762 (ppc_get_stub_entry): New function.
5763 (ppc_add_stub): New function.
5764 (create_linkage_sections): Use bfd_make_section_anyway. Create
5765 .branch_lt and .rela.branch_lt sections. Don't create .stub.
5766 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
5767 and set up for plt call stubs. Link func and func desc syms.
5768 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
5769 (func_desc_adjust): Avoid hash lookup when func desc sym available
5770 via shortcut, and set links when processing.
5771 (ppc64_elf_hide_symbol): Likewise.
5772 (allocate_dynrelocs): Don't allocate stub section here.
5773 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
5774 Remove sstub code.
5775 (ppc_type_of_stub): New function.
5776 (build_one_stub): Delete.
5777 (ppc_build_one_stub): New function.
5778 (ppc_size_one_stub): New function.
5779 (ppc64_elf_setup_section_lists): New function.
5780 (ppc64_elf_next_input_section): New function.
5781 (group_sections): New function.
5782 (get_local_syms): New function.
5783 (ppc64_elf_size_stubs): Rewrite.
5784 (ppc64_elf_build_stubs): Rewrite.
5785 (ppc64_elf_relocate_section): Look up stub entry for REL24
5786 relocs. Don't propagate REL14* to dynamic objects. Look for long
5787 branch stubs if REL14* or REL24 relocs won't reach.
5788 (bfd_elf64_bfd_link_hash_table_free): Define.
5789
5790 2002-04-30 Mark Mitchell <mark@codesourcery.com>
5791
5792 * config.bfd: Add support for powerpc-*-windiss.
5793
5794 2002-04-30 Tom Rix <trix@redhat.com>
5795
5796 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
5797 symbol names into the hash table.
5798
5799 2002-04-28 Tom Rix <trix@redhat.com>
5800
5801 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
5802 calulating relocations.
5803 (xcoff_complain_overflow) : Function table for relocation errors.
5804 (xcoff_ppc_relocate_section): Use relocation and complain function
5805 tables.
5806 (xcoff_complain_overflow_unsigned_func): New complain function.
5807 (xcoff_complain_overflow_signed_func): Same.
5808 (xcoff_complain_overflow_bitfield_func): Same.
5809 (xcoff_complain_overflow_dont_func): Same.
5810 (xcoff_reloc_type_crel): New recot function.
5811 (xcoff_reloc_type_br): Same.
5812 (xcoff_reloc_type_ba): Same.
5813 (xcoff_reloc_type_toc): Same.
5814 (xcoff_reloc_type_rel): Same.
5815 (xcoff_reloc_type_neg): Same.
5816 (xcoff_reloc_type_pos): Same.
5817 (xcoff_reloc_type_fail): Same.
5818 (xcoff_reloc_type_noop): Same.
5819 * libxcoff.h : Declare common parts for xcoff64.
5820 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
5821 and complain function tables.
5822
5823 2002-04-28 Alan Modra <amodra@bigpond.net.au>
5824
5825 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
5826 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
5827
5828 2002-04-26 Alan Modra <amodra@bigpond.net.au>
5829
5830 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
5831 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
5832
5833 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
5834 same as the output before calling elf_link_input_bfd.
5835
5836 * coffcode.h (coff_compute_section_file_positions): Set
5837 section_tail after shuffling section list.
5838
5839 2002-04-24 Christian Groessler <chris@groessler.org>
5840
5841 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
5842 addresses are 23bit with a special layout, not plain 32bit
5843 values. Prevent relocation of immediate values.
5844
5845 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
5846
5847 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
5848 MIPS-16 ASE flags are set, print something to indicate that.
5849
5850 2002-04-23 Alan Modra <amodra@bigpond.net.au>
5851
5852 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
5853 under which a plt call stub is used.
5854 (final_link_relocate): Similarly.
5855 (allocate_plt_static): Clear h-plabel except when plt entry is
5856 exclusively used for a plabel.
5857 (allocate_dynrelocs): Use the above to simplify plt sizing.
5858 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
5859 (elf32_hppa_link_hash_table_create): Init.
5860 (BL22_RP): Define.
5861 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
5862 (elf32_hppa_check_relocs): Set has_22bit_branch.
5863
5864 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
5865 (final_link_relocate): Likewise.
5866
5867 2002-04-22 Jakub Jelinek <jakub@redhat.com>
5868
5869 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
5870 search table if some FDE is DW_EH_PE_aligned encoded either.
5871 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
5872
5873 2002-04-22 Richard Smith <richard@ex-parrot.com>
5874 Jakub Jelinek <jakub@redhat.com>
5875
5876 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
5877 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
5878 encoded personality.
5879 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
5880 for CIE/FDE removal.
5881
5882 2002-04-20 Tom Rix <trix@redhat.com>
5883
5884 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
5885
5886 2002-04-20 Alan Modra <amodra@bigpond.net.au>
5887
5888 * archures.c (bfd_lookup_arch): Move the list order comment..
5889 (struct bfd_arch_info): ..to where it belongs.
5890 * bfd-in2.h: Regenerate.
5891
5892 * archures.c (bfd_lookup_arch): Add comment on list order.
5893 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
5894 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
5895 is always at head of list.
5896
5897 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
5898
5899 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
5900 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
5901 definition of these functions for ARM_WINCE builds as they are
5902 not used.
5903 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
5904 for ARM_WINCE builds.
5905
5906 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
5907
5908 * coff-arm.c (bfd_arm_process_before_allocation):
5909
5910 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
5911
5912 * cpu-sh.c (scan_mach): Delete.
5913 (arch_info_struct): Replace scan_mach with bfd_default_scan.
5914 (bfd_sh_arch): Likewise.
5915
5916 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
5917
5918 * ihex.c (ihex_write_object_contents): Fix check for records
5919 crossing 64K boundaries.
5920
5921 2002-04-16 Alan Modra <amodra@bigpond.net.au>
5922
5923 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
5924 type rather than just assuming entries are ELF.
5925 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5926 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5927 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
5928 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
5929 rather than elf_link_hash_entry.
5930
5931 2002-04-15 Richard Henderson <rth@redhat.com>
5932
5933 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
5934 n32 binaries.
5935
5936 2002-04-15 Michael Snyder <msnyder@redhat.com>
5937
5938 * opncls.c (bfd_close): Write contents if writeable.
5939 Minor formatting tidy-ups.
5940
5941 2002-04-15 Alan Modra <amodra@bigpond.net.au>
5942
5943 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
5944
5945 2002-04-12 Michael Snyder <msnyder@redhat.com>
5946
5947 * bfd-in.h (bfd_get_section_lma): New access macro.
5948 Minor white-space fix-up.
5949
5950 2002-04-12 Alan Modra <amodra@bigpond.net.au>
5951
5952 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
5953 header pad.
5954
5955 2002-04-09 DJ Delorie <dj@redhat.com>
5956
5957 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
5958
5959 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
5960
5961 * coffcode.h (coff_read_word): New.
5962 (coff_compute_checksum): New.
5963 (coff_apply_checksum): New.
5964 (coff_write_object_contents): Call coff_apply_checksum () to
5965 apply checksum to PE image.
5966
5967 2002-04-08 Randolph Chung <tausq@debian.org>
5968
5969 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
5970 (elf32_hppa_final_link): Split out sorting logic to..
5971 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
5972 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
5973
5974 2002-04-07 Andrew Cagney <ac131313@redhat.com>
5975
5976 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
5977 pattern.
5978 * configure: Re-generate.
5979
5980 2002-04-07 Andrew Cagney <ac131313@redhat.com>
5981
5982 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
5983 is greater or equal to 4.3.3.
5984 * configure: Regenerate.
5985 Fix PR gdb/344.
5986
5987 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
5988
5989 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
5990 R_CRIS_32_PCREL>: Fix typo in name.
5991 (cris_elf_check_relocs): Always create .rela.got here when
5992 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
5993 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
5994 assume it's created.
5995
5996 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
5997
5998 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
5999 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
6000 define.
6001 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
6002 * bfd.c (bfd_link_hash_table_free): Define.
6003 * binary.c (binary_bfd_link_hash_table_free): Define.
6004 * bout.c (b_out_bfd_link_hash_table_free): Define.
6005 * coff-rs6000.c (rs6000coff_vec): Include
6006 _bfd_generic_link_hash_table_free.
6007 (pmac_xcoff_vec): Likewise.
6008 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6009 (aix5coff64_vec): Likewise.
6010 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
6011 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
6012 (bfd_elf32_bfd_link_hash_table_free): Define.
6013 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
6014 (bfd_elf32_bfd_link_hash_table_free): Define.
6015 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
6016 define.
6017 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
6018 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
6019 * ieee.c (ieee_bfd_link_hash_table_free): Define.
6020 * ihex.c (ihex_bfd_link_hash_table_free): Define.
6021 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
6022 (_bfd_generic_link_hash_table_free): Add prototype.
6023 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
6024 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
6025 * linker.c (_bfd_generic_link_hash_table_free): New function.
6026 * mmo.c (mmo_bfd_link_hash_table_free): Define.
6027 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
6028 * oasys.c (oasys_bfd_link_hash_table_free): Define.
6029 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
6030 * som.c (som_bfd_link_hash_table_free): Define.
6031 * srec.c (srec_bfd_link_hash_table_free): Define.
6032 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
6033 * versados.c (versados_bfd_link_hash_table_free): Define.
6034 * vms.c (vms_bfd_link_hash_table_free): New function.
6035 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
6036
6037 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
6038 instead of bfd_alloc.
6039 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
6040 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
6041 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
6042 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
6043 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
6044 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
6045 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
6046 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
6047 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
6048 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
6049 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
6050 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
6051 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
6052 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
6053 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
6054 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
6055 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
6056 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
6057 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
6058 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
6059 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
6060 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
6061 * m68klinux.c (linux_link_hash_table_create): Likewise.
6062 * sparclinux.c (linux_link_hash_table_create): Likewise.
6063 * sunos.c (sunos_link_hash_table_create): Likewise.
6064 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
6065
6066 * targets.c: Add _bfd_link_hash_table_free to xvec.
6067
6068 * bfd-in2.h: Regenerate.
6069 * libbfd.h: Regenerate.
6070 * libcoff.h: Regenerate.
6071
6072 2002-04-04 Alan Modra <amodra@bigpond.net.au>
6073
6074 * dep-in.sed: Cope with absolute paths.
6075 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
6076 Run "make dep-am".
6077 * Makefile.in: Regenerate.
6078 * coff-arm.c: Fix copyright date.
6079 * cpu-h8300.c: Likewise.
6080 * cpu-i370.c: Likewise.
6081 * cpu-s390.c: Likewise.
6082 * cpu-mips.c: Likewise.
6083 * po/SRC-POTFILES.in: Regenerate.
6084
6085 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6086
6087 * Makefile.am: Add elfxx-mips.c to the known backends.
6088 (elf32-mips.lo): remove dependency to coff/external.h.
6089 * Makefile.in: Regenerate.
6090 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
6091 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
6092 accordingly.
6093 * configure: Regenerate.
6094 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
6095 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
6096 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
6097 MIPS specific backend functions.
6098 * elf32-mips.c: Moved most code to elfxx-mips.c.
6099 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
6100 static.
6101 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
6102 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
6103 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
6104 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
6105 interface to allow selection of the right REL or RELA howto table.
6106 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
6107 static. Let it refuse n32 objects.
6108 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
6109 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
6110 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
6111 (elf32_mips_ignore_discarded_relocs): Rename from
6112 _bfd_elf32_mips_ignore_discarded_relocs.
6113 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
6114 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
6115 (elf_mips_howto_table_rela): Remove.
6116 * elf64-mips.c: Moved most code to elfxx-mips.c.
6117 (bfd_elf64_bfd_reloc_type_lookup): Make static.
6118 (mips_elf64_rtype_to_howto): New function.
6119 (mips_elf64_object_p): Likewise.
6120 (elf64_mips_irix_compat): Likewise.
6121 * elfxx-mips.c: New file containing common code merged together from
6122 elf32-mips.c and elf64-mips.c.
6123 * elfxx-mips.h: New file containing MIPS specific prototypes from
6124 elf-bfd.h.
6125 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
6126 elf_backend_mips_rtype_to_howto.
6127
6128 2002-04-04 Alan Modra <amodra@bigpond.net.au>
6129
6130 * srec.c (MAXCHUNK, Chunk): Revise comments.
6131 (srec_write_record): Correct buffer size.
6132 (srec_write_header): Do without intermediate buffer.
6133 (srec_write_section): Validate Chunk.
6134 (srec_write_terminator): Pass NULL instead of dummy buffer.
6135 (srec_write_symbols): Pass file and symbol names directly to
6136 bfd_bwrite so sprintf won't overflow buffer.
6137
6138 2002-04-03 Jakub Jelinek <jakub@redhat.com>
6139
6140 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
6141 PC relative relocs against hidden symbols.
6142 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6143
6144 2002-04-03 Alan Modra <amodra@bigpond.net.au>
6145
6146 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
6147 LMAs, loop over segments until p_vaddr and p_memsz specify an
6148 extent enclosing the section.
6149
6150 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
6151
6152 * ihex.c (ihex_write_object_contents): Do not allow records to
6153 cross a 64K boundary - wrap if necessary.
6154
6155 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
6156
6157 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
6158 which caused the returned LWP ID to always be 0.
6159
6160 2002-04-01 Richard Henderson <rth@redhat.com>
6161
6162 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6163 (elf32_sparc_relocate_section): Use it to figure out when to
6164 initialize .got entries.
6165 * elf64-sparc.c: Similarly.
6166
6167 2002-03-28 Alan Modra <amodra@bigpond.net.au>
6168
6169 * linker.c (link_action): Ignore duplicate warning syms.
6170 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
6171 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
6172 (elf_adjust_dynamic_symbol): Likewise.
6173 (elf_export_symbol): Likewise.
6174 (elf_link_find_version_dependencies): Likewise.
6175 (elf_link_assign_sym_version): Likewise.
6176 (elf_link_sec_merge_syms): Likewise.
6177 (elf_link_output_extsym): Likewise.
6178 (elf_gc_sweep_symbol): Likewise.
6179 (elf_gc_propagate_vtable_entries_used): Likewise.
6180 (elf_gc_smash_unused_vtentry_relocs): Likewise.
6181 (elf_gc_allocate_got_offsets): Likewise.
6182 (elf_collect_hash_codes): Likewise.
6183 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
6184 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
6185 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
6186 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
6187 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
6188 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
6189 (elf_cris_discard_excess_dso_dynamics): Likewise.
6190 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
6191 (mark_PIC_calls): Likewise.
6192 (allocate_plt_static): Likewise.
6193 (allocate_dynrelocs): Likewise.
6194 (readonly_dynrelocs): Likewise.
6195 * elf32-i386.c (allocate_dynrelocs): Likewise.
6196 (readonly_dynrelocs): Likewise.
6197 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
6198 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
6199 * elf32-mips.c (mips_elf_output_extsym): Likewise.
6200 (mips_elf_sort_hash_table_f): Likewise.
6201 (mips_elf_check_mips16_stubs): Likewise.
6202 * elf32-s390.c (allocate_dynrelocs): Likewise.
6203 (readonly_dynrelocs): Likewise.
6204 * elf32-sh.c (sh_elf_discard_copies): Likewise.
6205 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
6206 (xstormy16_relax_plt_realloc): Likewise.
6207 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
6208 (elf64_alpha_output_extsym): Likewise.
6209 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
6210 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
6211 (mips_elf64_check_mips16_stubs): Likewise.
6212 (mips_elf64_output_extsym): Likewise.
6213 * elf64-ppc.c (func_desc_adjust): Likewise.
6214 (allocate_dynrelocs): Likewise.
6215 (readonly_dynrelocs): Likewise.
6216 * elf64-s390.c (allocate_dynrelocs): Likewise.
6217 (readonly_dynrelocs): Likewise.
6218 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
6219 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
6220 (readonly_dynrelocs): Likewise.
6221 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
6222 * aoutx.h (aout_link_write_other_symbol): Likewise.
6223 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
6224 (_bfd_coff_write_global_sym): Likewise.
6225 * i386linux.c (linux_tally_symbols): Likewise.
6226 * m68klinux.c (linux_tally_symbols): Likewise.
6227 * sparclinux.c (linux_tally_symbols): Likewise.
6228 * pdp11.c (aout_link_write_other_symbol): Likewise.
6229 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
6230 * xcofflink.c (xcoff_build_ldsyms): Likewise.
6231 (xcoff_write_global_symbol): Likewise.
6232
6233 * cofflink.c (_bfd_coff_final_link): Formatting.
6234 * cpu-mips.c (mips_compatible): Make static, prototype.
6235 * elf32-i386.c (elf_i386_check_relocs): Formatting.
6236 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
6237 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
6238 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
6239 (mips_elf64_final_link): Likewise.
6240 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
6241 prototype.
6242
6243 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
6244
6245 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
6246 (SWAP_OUT_RELOC_OFFSET): Define.
6247
6248 2002-03-27 Gregory Steuck <greg@nest.cx>
6249
6250 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
6251 terminating NULL if empty symbol table.
6252 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
6253
6254 2002-03-26 H.J. Lu (hjl@gnu.org)
6255
6256 * elflink.h (elf_link_input_bfd): Revert the last change since
6257 the gcc exception handling isn't fixed yet.
6258
6259 2002-03-26 H.J. Lu (hjl@gnu.org)
6260
6261 * elflink.h (elf_link_input_bfd): Complain about relocations
6262 against local symbols in discarded sections.
6263
6264 2002-03-26 Alan Modra <amodra@bigpond.net.au>
6265
6266 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
6267
6268 2002-03-23 Alan Modra <amodra@bigpond.net.au>
6269
6270 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
6271 section file offset for !SEC_LOAD sections.
6272
6273 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
6274
6275 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
6276 <case R_ARM_GOT>): Handle relocations to Thumb functions.
6277
6278 2002-03-21 Alan Modra <amodra@bigpond.net.au>
6279
6280 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
6281 Whitespace changes.
6282 * archive.c: Update copyright date.
6283 * bfd-in2.h: Regenerate.
6284 * libbfd.h: Regenerate.
6285 * Makefile.am: Run "make dep-am"
6286 * Makefile.in: Regenerate.
6287 * po/SRC-POTFILES.in: Regenerate.
6288
6289 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
6290
6291 * dwarf2.c (struct funcinfo): Move up.
6292 (lookup_address_in_function_table): New argument function_ptr.
6293 Set it.
6294 (lookup_address_in_line_table): New argument function. If function
6295 is non-NULL, use it to handle ``addr'' before the first line note of
6296 the function.
6297 (comp_unit_find_nearest_line): Update and swap calls to
6298 lookup_address_in_function_table and lookup_address_in_line_table.
6299 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
6300 N_SLINE encountered if we see an N_FUN before any N_SLINE.
6301
6302 2002-03-20 Tom Rix <trix@redhat.com>
6303
6304 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
6305 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
6306 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
6307
6308 2002-03-19 Tom Rix <trix@redhat.com>
6309
6310 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
6311 dynamic objects in archives.
6312
6313 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
6314
6315 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
6316 STT_NOTYPE symbols to STT_OBJECT.
6317
6318 2002-03-18 Jan Hubicka <jh@suse.cz>
6319
6320 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
6321
6322 2002-03-18 Tom Rix <trix@redhat.com>
6323
6324 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
6325 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
6326 * coff-rs6000 (do_pad) : New function for archive padding.
6327 (do_copy) : New function for object file copying in archives.
6328 (do_shared_object_padding) : New function for padding shared
6329 objects to their text section alignment in archives.
6330 (bfd_xcoff_ar_achive_set_magic) : Stub.
6331 (xcoff_write_armap_big) : Use do_copy and do_pad.
6332 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
6333 do_copy and do_pad.
6334 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
6335 bfd_xcoff_magic_number.
6336 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
6337 fop.
6338 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
6339 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
6340 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
6341 * rs6000-core.c : Update copyright date.
6342 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
6343 csectpp.
6344 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
6345 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
6346 (coff_set_flags) : Use bfd_xcoff_magic_number.
6347 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
6348 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
6349 * Makefile.am : Same.
6350 * config.bfd : Same.
6351 * targets.c : Same.
6352 * configure : Regnerate.
6353 * Makefile.in : Same.
6354 * bfd-in2.h : Same.
6355
6356 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
6357
6358 * po/fr.po: Updated version.
6359
6360 2002-03-18 Alan Modra <amodra@bigpond.net.au>
6361
6362 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
6363 * libbfd.h: Regenerate.
6364 * archive.c (coff_write_armap): Pass on failures from
6365 bfd_write_bigendian_4byte_int.
6366
6367 2002-03-14 H.J. Lu <hjl@gnu.org>
6368
6369 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
6370 error to bfd_error_nonrepresentable_section for reinit_array
6371 section in DSO.
6372
6373 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
6374
6375 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
6376 OR it in rather than replacing previously selected flags.
6377
6378 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
6379 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
6380
6381 2002-03-14 Alan Modra <amodra@bigpond.net.au>
6382
6383 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
6384 (N): Use the above.
6385 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
6386 ensure reloc size matches before calling elf_link_input_bfd.
6387 Add an assert to check reloc size when counting output relocs.
6388
6389 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
6390
6391 * mmo.c (mmo_get_loc): Return NULL rather than false.
6392
6393 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
6394
6395 * po/fr.po: Updated version.
6396
6397 2002-03-13 Alan Modra <amodra@bigpond.net.au>
6398
6399 * archures.c (bfd_default_compatible): Test bits_per_word.
6400 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
6401 bfd_default_compatible.
6402 * cpu-i370.c (i370_compatible): Likewise.
6403 * cpu-sparc.c (sparc_compatible): Likewise.
6404 * cpu-h8300.c (compatible): Test in->arch == out->arch.
6405
6406 * elflink.h: Formatting fixes.
6407 (elf_link_output_extsym): Merge undefined and undef weak cases.
6408
6409 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
6410 when word size of input matches output word size.
6411
6412 2002-03-12 Andreas Jaeger <aj@suse.de>
6413
6414 * cpu-i386.c (i386_compatible): New. Use it instead of
6415 bfd_default_compatible.
6416
6417 2002-03-07 H.J. Lu (hjl@gnu.org)
6418
6419 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
6420 as the type for bfd_reloc_val.
6421
6422 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
6423
6424 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
6425 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
6426 (elf_hppa_final_link_relocate): Correct relocations for indirect
6427 references to local data through the DLT. Fix .opd creation for
6428 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
6429 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
6430 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
6431 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
6432 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
6433 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
6434 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
6435
6436 2002-03-05 Jakub Jelinek <jakub@redhat.com>
6437
6438 * merge.c (_bfd_merge_sections): Don't segfault if there
6439 is nothing to merge due to GC.
6440
6441 2002-03-05 Alan Modra <amodra@bigpond.net.au>
6442
6443 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
6444 symbols that have been forced local.
6445
6446 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
6447 to output forced local syms for non-shared link.
6448 (elf_link_output_extsym): Tweak condition for calling backend
6449 adjust_dynamic_symbol so that previous behaviour is kept.
6450 Whitespace changes throughout file.
6451
6452 2002-03-04 H.J. Lu <hjl@gnu.org>
6453
6454 * elf.c (bfd_section_from_shdr): Handle special sections,
6455 .init_array, .fini_array and .preinit_array.
6456 (elf_fake_sections): Likewise.
6457
6458 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
6459 DT entry only if the section is in output for .init_array,
6460 .fini_array and .preinit_array. Complain about .preinit_array
6461 section in DSO.
6462 (elf_bfd_final_link): Warn zero size for .init_array,
6463 .fini_array and .preinit_array sections.
6464
6465 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
6466 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
6467 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
6468 .preinit_array.
6469
6470 2002-03-04 Alan Modra <amodra@bigpond.net.au>
6471
6472 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
6473 * configure: Regenerate.
6474
6475 2002-03-02 Tom Rix <trix@redhat.com>
6476
6477 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
6478 symbolic equiv.
6479 * coff-rs6000.c (xcoff_howto_table): Same.
6480
6481 2002-03-01 David Mosberger <davidm@hpl.hp.com>
6482
6483 * elflink.h (size_dynamic_sections): If section named
6484 ".preinit_array" exists, create DT_PREINIT_ARRAY and
6485 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
6486 ".init_array" and ".fini_array".
6487 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
6488 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
6489 DT_FINI_ARRAY.
6490
6491 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
6492
6493 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
6494 dynsyms.
6495
6496 2002-02-25 Alan Modra <amodra@bigpond.net.au>
6497
6498 * elf64-hppa.h: Update copyright date.
6499
6500 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
6501 (ppc64_elf_relocate_section): Don't generate power4 style branch
6502 hints for *_BRTAKEN and *_BRNTAKEN relocs.
6503
6504 2002-02-22 Jakub Jelinek <jakub@redhat.com>
6505
6506 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
6507 last patch.
6508 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6509
6510 2002-02-21 Andreas Jaeger <aj@suse.de>
6511
6512 * elf64-x86-64.c: Major rework that introduces all recent changes
6513 to the x86-64 backend. Get a closer match to elf32-i386.
6514 (struct elf64_x86_64_dyn_relocs): Rename from
6515 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
6516 all users.
6517 (struct elf64_x86_64_link_hash_table): Add short cuts to some
6518 sections.
6519 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
6520 remove casts, initialize new hash members.
6521 (create_got_section): New.
6522 (elf64_x86_64_create_dynamic_sections): New.
6523 (elf64_x86_64_copy_indirect_symbol): New.
6524 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
6525 relocs, .got or .relgot here but do it in allocate_dynrelocs.
6526 Reference count possible .plt and .got entries. Don't test input
6527 section SEC_READONLY here to try to avoid copy relocs, and keep
6528 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
6529 DF_TEXTREL here. Delay setting of variables until needed. Cache
6530 pointer to "sreloc" section in elf_section_data. Tweak condition
6531 under which .got created. Report files with bad relocation
6532 section names.
6533 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
6534 Reference count possible .plt entries. Don't deallocate .got and
6535 .relgot space here.
6536 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
6537 do copy reloc processing for weakdefs. Remove redundant casts and
6538 aborts. Delay setting of vars until needed. Move creation of
6539 dynamic symbols and allocation of .plt and .rela.plt to
6540 allocate_dynrelocs. Replace BFD_ASSERT with abort.
6541 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6542 (allocate_dynrelocs): New.
6543 (readonly_dynrelocs): New.
6544 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
6545 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
6546 Zero out the dynamic allocated content space.
6547 (elf64_x86_64_discard_copies): Removed.
6548 (elf64_x86_64_relocate_section): Make use of dynamic section
6549 short-cuts. Localise vars, and delay setting. Better error
6550 reporting, replace BFD_ASSERT with abort. Check
6551 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
6552 regular object file and tread the weak definition as the normal
6553 one. Don't discard relocs for undefweak or undefined symbols and
6554 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
6555 relocs.
6556 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
6557 symbols that have been forced local. Use same test to decide if
6558 we can use a relative reloc for got as relocate_section. Expand
6559 SHN_UNDEF comment. Move expressions out of function calls.
6560 Replace BFD_ASSERT with abort.
6561 (bfd_elf64_bfd_final_link): Removed.
6562 (elf_backend_copy_indirect_symbol): Define.
6563
6564 2002-02-20 Tom Rix <trix@redhat.com>
6565
6566 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
6567 (_bfd_xcoff_reloc_type_lookup): Use it.
6568 * coff64-rs6000.c (xcoff64_howto_table): Same.
6569 (xcoff64_reloc_type_lookup): Same.
6570
6571 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
6572
6573 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
6574 little endian.
6575
6576 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
6577
6578 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
6579 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
6580 * bfd-in2.h: Regenerate.
6581 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
6582 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
6583 with "s390:64-bit".
6584 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
6585 (elf_s390_reloc_type_lookup): Likewise.
6586 (elf_s390_check_relocs): Likewise.
6587 (elf_s390_gc_sweep_hook): Likewise.
6588 (elf_s390_relocate_section): Likewise.
6589 (elf_s390_object_p): Use renamed architecture define.
6590 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
6591
6592 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
6593
6594 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
6595
6596 2002-02-19 Jakub Jelinek <jakub@redhat.com>
6597
6598 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
6599 absptr -> pcrel optimization for shared libs.
6600 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
6601 library cannot be converted to pcrel.
6602 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
6603 relative.
6604 * elf32-i386.c (elf_i386_relocate_section): If
6605 _bfd_elf_section_offset returned -2, skip, but make sure the
6606 relocation is installed.
6607 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
6608 * elf32-cris.c (cris_elf_relocate_section): Likewise.
6609 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
6610 * elf32-i370.c (i370_elf_relocate_section): Likewise.
6611 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
6612 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
6613 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6614 * elf32-sh.c (sh_elf_relocate_section): Likewise.
6615 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6616 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6617 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6618 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
6619 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6620 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6621 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
6622 _bfd_elf_section_offset returning -2 the same way as -1.
6623 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
6624 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
6625 and BFD_ASSERT.
6626 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
6627
6628 2002-02-18 Tom Rix <trix@redhat.com>
6629
6630 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
6631 (bfd_xcoff_size_dynamic_sections): Same.
6632 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
6633 (bfd_xcoff_size_dynamic_sections): Same.
6634 * coff-rs6000.c (xcoff_generate_rtinit): Same.
6635 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
6636 * libxcoff.h (struct xcoff_backend_data_rec): Same.
6637 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
6638 * bfd-in2.h: Regenerate.
6639
6640 2002-02-18 Alan Modra <amodra@bigpond.net.au>
6641
6642 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
6643 (struct ppc_link_hash_table): Add sfpr.
6644 (ppc64_elf_link_hash_table_create): Init it.
6645 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
6646 .glink out to..
6647 (create_linkage_sections): ..here. Make .sfpr too.
6648 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
6649 dynobj early.
6650 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
6651 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
6652 ._restf* functions, and create as needed.
6653 (func_desc_adjust): Only force_local for shared libs.
6654
6655 2002-02-18 David O'Brien <obrien@FreeBSD.org>
6656
6657 * configure.in: Bump version number post 2.12 branching.
6658 * configure: Regenerate.
6659
6660 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
6661
6662 * mmo.c: Correct and improve comments.
6663 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
6664 zero-pad. Use input to fill up non-empty bfd buffer.
6665 (mmo_flush_chunk): New function.
6666 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
6667 changed. Don't emit location specifier if VMA is same as
6668 *LAST_VMAP after omitting leading zero contents. Call
6669 mmo_flush_chunk before emitting location specifier.
6670 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
6671 with mmo_write_loc_chunk calls.
6672 (mmo_internal_write_section): Call mmo_flush_chunk after
6673 mmo_write_chunk.
6674 (mmo_write_symbols_and_terminator): Move :Main to first position
6675 in symbol array. Add faked one if it does not exist if there are
6676 other symbols. Don't add it if there are no symbols at all. Move
6677 out test for value of :Main from symbol loop. Rename table
6678 fakemain to maintable and variable mainsym to fakemain.
6679
6680 2002-02-15 Richard Henderson <rth@redhat.com>
6681
6682 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
6683 section with no got matches any got. Simplify error generaion.
6684
6685 2002-02-15 Alan Modra <amodra@bigpond.net.au>
6686
6687 Support arbitrary length fill patterns.
6688 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
6689 (_bfd_default_link_order): Remove bfd_fill_link_order code.
6690 Call default_data_link_order.
6691 (default_fill_link_order): Delete.
6692 (default_data_link_order): New function.
6693 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
6694 of bfd_fill_link_order with bfd_data_link_order.
6695 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
6696 * elf64-mips.c (mips_elf64_final_link): Likewise.
6697
6698 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
6699 Correct value returned in "end" for "0x<non-hex>".
6700
6701 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
6702
6703 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
6704 (scan): Test against 'mach' field in info structure.
6705
6706 2002-02-14 Alan Modra <amodra@bigpond.net.au>
6707
6708 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
6709
6710 2002-02-14 Matt Fredette <fredette@netbsd.org>
6711
6712 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
6713 EF_M68000.
6714
6715 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
6716
6717 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
6718 non-zero physical addresses when adjusting the LMAs of new
6719 sections.
6720
6721 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
6722
6723 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
6724 from _bfd_elf_hppa_gen_reloc_type.
6725 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
6726 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
6727 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
6728 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
6729
6730 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
6731
6732 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
6733 loading its contents if there's nothing to do in it.
6734
6735 2002-02-12 Alan Modra <amodra@bigpond.net.au>
6736
6737 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
6738 64k boundary.
6739
6740 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
6741 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
6742 (ppc64_elf_finish_dynamic_sections): Set values for them.
6743
6744 2002-02-11 Michael Snyder <msnyder@redhat.com>
6745
6746 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
6747 * elf.c (elfcore_grok_pstatus): Add prototype.
6748 (elfcore_grok_lwpstatus): Add prototype.
6749 (elfcore_write_lwpstatus): New function.
6750 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
6751
6752 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
6753
6754 * elf32-sh.c: Added missing prototypes.
6755 * elf32-sh64.c: Likewise.
6756 (sh_elf_align_loads): Mark unused args as such.
6757 * elf64-sh64.c: Added missing prototypes.
6758 (struct elf_sh64_link_hash_entry): Fix typo.
6759 (sh_elf64_relocate_section): Fix info argument passed to
6760 _bfd_elf_section_offset.
6761
6762 2002-02-11 Alan Modra <amodra@bigpond.net.au>
6763
6764 * Makefile.am: "make dep-am".
6765 * Makefile.in: Regenerate.
6766 * aclocal.m4: Regenerate.
6767 * config.in: Regenerate.
6768 * configure: Regenerate.
6769
6770 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
6771
6772 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
6773 variable warnings.
6774 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
6775 comparison warning.
6776 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
6777 cast warnings for the common case.
6778
6779 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
6780
6781 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
6782 vectors.
6783 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
6784 vectors.
6785
6786 2002-02-09 Richard Henderson <rth@redhat.com>
6787
6788 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
6789 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
6790 (elf64_alpha_relocate_section): Likewise.
6791 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
6792 * bfd-in2.h, libbfd.h: Rebuild.
6793
6794 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
6795
6796 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
6797 that base-plus-offset reloc accounting is consistent.
6798 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
6799 up to date for undefined symbols.
6800
6801 2002-02-08 Eric Christopher <echristo@redhat.com>
6802
6803 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6804
6805 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
6806 sections for the O32 ABI.
6807
6808 2002-02-08 Chris Demetriou <cgd@broadcom.com>
6809
6810 * elf32-arm.h: Fix formatting of _("...").
6811 * elf32-d10v.c: Likewise.
6812 * elf32-m68k.c: Likewise.
6813 * elf32-mips.c: Likewise.
6814
6815 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
6816
6817 * coff-or32.c: Fix compile time warning messages.
6818
6819 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
6820
6821 Contribute sh64-elf.
6822 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
6823 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
6824 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
6825 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
6826 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
6827 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
6828 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
6829 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
6830 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
6831 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
6832 New relocs.
6833 * libbfd.h, bfd-in2.h: Rebuilt.
6834 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
6835 (sh_reloc_map): Map them.
6836 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
6837 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
6838 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
6839 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
6840 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
6841 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
6842 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
6843 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
6844 datalabel_got_offset.
6845 (sh_elf_link_hash_newfunc): Initialize it.
6846 (sh_elf_relocate_section): Augment the scope of
6847 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
6848 GOT and GOTOFF handling to new SHmedia relocation types. Support
6849 GOT_BIAS.
6850 (sh_elf_check_relocs): Likewise.
6851 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
6852 PLT entries using movi_shori_putval. Support GOT_BIAS.
6853 (sh_elf_finish_dynamic_sections): Likewise.
6854 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
6855 relocation, it's now done by the caller.
6856 (GOT_BIAS): New.
6857 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
6858 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
6859 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
6860 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
6861 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
6862 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
6863 sh64_elf64_hash_table): New.
6864 (sh_elf64_howto_table): Introduce new relocs.
6865 (sh_elf64_info_to_howto): Accept new PIC relocs.
6866 (sh_elf64_relocate_section): Augment the scope of
6867 seen_stt_datalabel. Support new PIC relocs.
6868 (sh_elf64_check_relocs): Support new PIC relocs.
6869 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
6870 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
6871 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
6872 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
6873 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
6874 movi_shori_putval, movi_3shori_putval,
6875 sh64_elf64_create_dynamic_sections,
6876 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
6877 sh64_elf64_size_dynamic_sections,
6878 sh64_elf64_finish_dynamic_symbol,
6879 sh64_elf64_finish_dynamic_sections): New.
6880 (elf_backend_create_dynamic-sections,
6881 bfd_elf64_bfd_link_hash_table_create,
6882 elf_backend_adjust_dynamic_symbol,
6883 elf_backend_size_dynamic_sections,
6884 elf_backend_finish_dynamic_symbol,
6885 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
6886 elf_backend_plt_readonly, elf_backend_want_plt_sym,
6887 elf_backend_got_header_size, elf_backend_plt_header_size):
6888 Define.
6889 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
6890 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
6891 match official numbers and names; moved unmaching ones to the
6892 range 0xf2-0xff.
6893 * elf32-sh64.c, elf64-sh64.c: Likewise.
6894 2001-03-12 DJ Delorie <dj@redhat.com>
6895 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
6896 sections.
6897 2001-03-12 DJ Delorie <dj@redhat.com>
6898 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
6899 be aligned.
6900 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
6901 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
6902 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
6903 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
6904 .cranges section with SEC_SORT_ENTRIES set.
6905 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
6906 incoming sorted .cranges section.
6907 (sh64_bfd_elf_copy_private_section_data): New.
6908 (sh64_elf_final_write_processing): Only sort .cranges and modify
6909 start address if called by linker.
6910 2001-01-08 Ben Elliston <bje@redhat.com>
6911 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
6912 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
6913 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
6914 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
6915 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
6916 line. Add comments before all entries.
6917 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
6918 comment.
6919 (sh_elf64_reloc): Correct head comment.
6920 (sh_elf64_relocate_section): Correct spacing.
6921 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
6922 instead call reloc_dangerous callback.
6923 <case R_SH_SHMEDIA_CODE>: New case.
6924 (sh_elf64_gc_mark_hook): Correct spacing.
6925 (sh_elf64_check_relocs): Ditto.
6926 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
6927 New case.
6928 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
6929 functions.
6930 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
6931 clarify describing comment. Add comments before all entries.
6932 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
6933 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
6934 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
6935 Sort .cranges section in final link. Prepare to set bit 0 on
6936 entry address.
6937 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
6938 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
6939 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
6940 .cranges section.
6941 (sh64_backend_section_from_shdr): New, to recognize
6942 SHT_SH5_CR_SORTED on incoming .cranges section.
6943 (elf_backend_section_from_shdr): Define.
6944 (sh64_elf_final_write_processing): Sort outgoing .cranges
6945 section. (New, temporarily disabled:) Set bit 0 on entry address
6946 according to ISA type.
6947 (sh64_find_section_for_address): New.
6948 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
6949 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
6950 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
6951 bfd_malloc, not xmalloc.
6952 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
6953 global.
6954 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
6955 temporarily disabled) setting bit 0 on entry address.
6956 (elf_backend_final_write_processing): Define.
6957 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
6958 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
6959 be a proper relocation for PTA and PTB rather than a marker.
6960 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
6961 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
6962 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
6963 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
6964 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
6965 Zero src_mask.
6966 * elf64-sh64.c: Ditto.
6967 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
6968 * elf32-sh64.c: Include opcodes/sh64-opc.h
6969 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
6970 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
6971 parameters. No unused parameters. Caller changed.
6972 <case R_SH_PT_16>: New case.
6973 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
6974 * Makefile.in: Regenerate.
6975 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
6976 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
6977 all code sections.
6978 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
6979 (sh64_elf_merge_private_data): Ditto.
6980 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
6981 to access stored section flags.
6982 (sh64_elf_final_write_processing): Return immediately unless
6983 called by linker. Use sh64_elf_section_data (cranges) to get size
6984 of linker-generated cranges entries.
6985 (sh64_elf_copy_private_data): Add missing "return true".
6986 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
6987 (sh_elf64_merge_private_data): Ditto.
6988 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
6989 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
6990 elf64-sh64.c:sh64_elf_fake_sections.
6991 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
6992 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
6993 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
6994 (sh64_elf_final_write_processing): New.
6995 (elf_backend_final_write_processing): Define.
6996 (sh64_elf_fake_sections): Get header flags from tdata field.
6997 (sh64_elf_copy_private_data): Do not call
6998 sh64_elf_copy_private_data_internal, just copy e_flags field.
6999 (sh64_elf_merge_private_data): Do not call
7000 sh64_elf_copy_private_data_internal.
7001 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
7002 Remove EF_SH64_ABI64, let ELF size make difference.
7003 Remove SH64-specific BFD section flag.
7004 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
7005 containing SHmedia through elf_section_data (asect)->tdata
7006 non-zero, not using a BFD section flag.
7007 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
7008 (sh64_elf_merge_private_data): Similar.
7009 (elf_backend_section_flags): Don't define.
7010 (sh64_elf_backend_section_flags): Delete.
7011 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
7012 not EF_SH64_ABI64.
7013 (sh_elf64_merge_private_data): Similar.
7014 * section.c (Section flags definitions): Don't define
7015 SEC_SH_ISA_SHMEDIA.
7016 (bfd-in2.h): Regenerate.
7017 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
7018 Make DataLabel references work with partial linking.
7019 * elf32-sh64.c: Fix formatting.
7020 (sh64_elf_link_output_symbol_hook): New.
7021 (elf_backend_link_output_symbol_hook): Define to
7022 sh64_elf_link_output_symbol_hook.
7023 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
7024 undefined if partial linking. Adjust sanity check.
7025 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
7026 (elf_backend_link_output_symbol_hook): Define to
7027 sh64_elf64_link_output_symbol_hook.
7028 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
7029 undefined if partial linking. Adjust sanity check.
7030 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
7031 Implement semantics for inter-file DataLabel references.
7032 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
7033 (sh64_elf64_add_symbol_hook): New.
7034 (sh_elf64_relocate_section): If passing an indirect symbol with
7035 st_type STT_DATALABEL on the way to a symbol with st_other
7036 STO_SH5_ISA32, do not bitor 1 to the relocation.
7037 (elf_backend_add_symbol_hook): Define to
7038 sh64_elf64_add_symbol_hook.
7039 * elf64-sh32.c: Tweak comments.
7040 (DATALABEL_SUFFIX): Define.
7041 (sh64_elf_add_symbol_hook): New.
7042 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
7043 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
7044 symbol with st_type STT_DATALABEL on the way to a symbol with
7045 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
7046 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
7047 Pass through STT_DATALABEL.
7048 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
7049 (elf_backend_get_symbol_type): Define.
7050 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
7051 (elf_backend_get_symbol_type): Define.
7052 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
7053 * elf32-sh64.c: Tweak comments.
7054 (sh64_elf_copy_private_data_internal): Add prototype.
7055 (bfd_elf32_bfd_set_private_flags): Define.
7056 (sh64_elf_copy_private_data_internal): Compare machine name, not
7057 textual BFD target name, to check whether to copy section flag
7058 SHF_SH5_ISA32.
7059 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
7060 Tweak section-contents-type-mismatch message.
7061 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
7062 Validize reloc-types.
7063 * elf64-sh64.c: New file.
7064 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
7065 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
7066 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
7067 Regenerate dependencies.
7068 * Makefile.in: Regenerate.
7069 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
7070 bfd_elf64_sh64l_vec.
7071 * configure.in: Handle bfd_elf64_sh64_vec and
7072 bfd_elf64_sh64l_vec.
7073 * configure: Regenerate.
7074 * po/POTFILES.in: Regenerate.
7075 * po/bfd.pot: Regenerate.
7076 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
7077 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
7078 anything else but EF_SH64 and EF_SH64_ABI64.
7079 (sh64_elf_merge_private_data): Emit error for anything else but
7080 EF_SH64 and EF_SH64_ABI64.
7081 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
7082 from targ_selvecs.
7083 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
7084 bfd_elf32_sh64l_vec as a temporary measure.
7085 * configure: Regenerate.
7086 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
7087 * cpu-sh.c (arch_info_struct): Include sh5 item
7088 unconditionalized.
7089 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
7090 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
7091 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
7092 * elf32-sh64.c: Tweak comments.
7093 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
7094 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
7095 (sh64_elf_copy_private_data_internal): Wrap long line.
7096 (sh64_elf_merge_private_data): Rewrite to allow objects from
7097 SH64 subsets to be linked together.
7098 (INCLUDE_SHMEDIA): Define.
7099 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
7100 Parenthesize plus-expression inside or-expression.
7101 <global symbol>: Ditto.
7102 (sh_elf_set_mach_from_flags): Remove code refusing
7103 deleted EF_SH64_32BIT_ABI flag.
7104 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
7105 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
7106 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
7107 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
7108 (sh_elf_relocate_section) <local symbol>: Or 1 in
7109 calculation of relocation if sym->st_other & STO_SH5_ISA32.
7110 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
7111 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
7112 relocation.
7113 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
7114 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
7115 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
7116 Regenerate dependencies.
7117 * Makefile.in: Regenerate.
7118 * archures.c: Add bfd_mach_sh5.
7119 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
7120 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
7121 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
7122 * configure: Regenerate.
7123 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
7124 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
7125 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
7126 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
7127 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
7128 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
7129 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
7130 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
7131 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
7132 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
7133 in item for SH5.
7134 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
7135 for SHmedia relocs.
7136 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
7137 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
7138 shmedia_prepare_reloc, goto final_link_relocate if it returns
7139 non-zero, else fail as before.
7140 (sh_elf_set_mach_from_flags): Provide function only if not defined
7141 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
7142 (sh_elf_set_private_flags): Provide function only if not defined
7143 as a macro.
7144 (sh_elf_copy_private_data): Similar.
7145 (sh_elf_merge_private_data): Similar.
7146 * section.c (SEC_SH_ISA_SHMEDIA): New.
7147 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
7148 * elf32-sh64.c: New file.
7149 * libbfd.h: Regenerate.
7150 * bfd-in2.h: Regenerate.
7151 * po/POTFILES.in: Regenerate.
7152 * po/bfd.pot: Regenerate.
7153 * bfd-in2.h: Regenerate.
7154 * libbfd.h: Regenerate.
7155
7156 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
7157
7158 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
7159 been included, not drag it in.
7160 * bfd-in2.h: Regenerate.
7161
7162 2002-02-06 H.J. Lu (hjl@gnu.org)
7163
7164 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
7165 the mach and ISA fields if necessary.
7166
7167 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
7168
7169 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
7170 ARM architecture when an F_ARM_5 flag is detected, since we cannot
7171 be sure exactly which architecture this represents.
7172
7173 2002-02-05 Nick Clifton <nickc@redhat.com>
7174
7175 * po/tr.po: Updated translation.
7176
7177 2002-02-05 Alan Modra <amodra@bigpond.net.au>
7178
7179 From Jimi X <jimix@watson.ibm.com>
7180 * archures (bfd_mach_ppc64): Define.
7181 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
7182 (bfd_powerpc_arch): Define.
7183 * bfd-in2.h: Regenerate.
7184 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
7185 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
7186 (bfd_powerpc_archs): Add default powerpc64 arch.
7187
7188 2002-02-05 Alan Modra <amodra@bigpond.net.au>
7189
7190 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
7191 against section syms in readonly sections. Don't do the global
7192 sym check if we find one.
7193 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
7194 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
7195 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
7196 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
7197 (elf_s390_grok_prstatus): Add missing prototype.
7198
7199 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
7200
7201 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
7202 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
7203 Call bfd_get_section_by_name only once. Initialize
7204 bpodata->n_bpo_relocs_this_section.
7205 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
7206 referring to DSOs.
7207 (bpo_reloc_request_sort_fn): Don't use difference of values as
7208 return-value.
7209
7210 2002-02-02 David O'Brien <obrien@FreeBSD>
7211
7212 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
7213 version 4.5 and later the same as 5-CURRENT.
7214 * configure: Re-generate.
7215
7216 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
7217
7218 * config.bfd (hppa*-*-netbsd*): New target.
7219
7220 2002-01-31 Philipp Thomas <pthomas@suse.de>
7221
7222 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
7223 to front of message. Unify messages with elf32-arm.h. Use
7224 commas where neccessary.
7225 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
7226 ERROR in messages. Unify messages with coff-arm.c. Correct
7227 VFP/FPA error message.
7228 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
7229 APCS-32 for translation.
7230
7231 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
7232
7233 Perform on-demand global register allocation from
7234 R_MMIX_BASE_PLUS_OFFSET relocs.
7235 * elf64-mmix.c (struct bpo_reloc_section_info, struct
7236 bpo_reloc_request, struct bpo_greg_section_info): New.
7237 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
7238 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
7239 _bfd_mmix_check_all_relocs,
7240 _bfd_mmix_prepare_linker_allocated_gregs,
7241 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
7242 (elf_mmix_howto_table): Correct src_mask for most relocs.
7243 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
7244 case.
7245 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
7246 case. Fix typo in comment. New label do_mmix_reloc.
7247 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
7248 store first object file with a base-plus-offset reloc. Call
7249 mmix_elf_check_common_relocs for the part common with mmo.
7250 (mmix_elf_final_link): Write out linker-allocated register
7251 contents section.
7252 (elf_backend_gc_sweep_hook): Define.
7253 (bfd_elf64_bfd_relax_section): Define.
7254
7255 * mmo.c: Don't include <ctype.h>
7256 (mmo_init): Correct init-once logic.
7257
7258 2002-02-01 Tom Rix <trix@redhat.com>
7259
7260 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
7261
7262 2002-02-01 Alan Modra <amodra@bigpond.net.au>
7263
7264 * Makefile.am: Run "make dep-am"
7265 * Makefile.in: Regenerate.
7266
7267 2002-01-31 David O'Brien <obrien@FreeBSD>
7268
7269 * configure.in: Recognize the differences in core files from FreeBSD
7270 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
7271 5-CURRENT.
7272 * configure: Regenerate.
7273
7274 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
7275
7276 * coff-or32.c: New file.
7277 * cpu-or32.c: New file.
7278 * elf32-or32.c: New file.
7279 * archures.c: Add support for or32.
7280 * targets.c: Add support for or32.
7281 * bfd-in2.h: Regenerate.
7282 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
7283 coff_write_object_contents): Add support for or32.
7284 * config.bfd: Add target.
7285 * configure.in: Add support for or32.
7286 * configure: Regenerate.
7287 * Makefile.am: Add support for or32.
7288 * Makefile.in: Regenerate.
7289 * po/SRC-POTFILES.in: Add or32 files.
7290 * po/bfd.pot: Regenerate.
7291
7292 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
7293 Don Lindsay <lindsayd@cisco.com>
7294
7295 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
7296 false' with a return of a bfd_reloc_ error code.
7297
7298 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
7299
7300 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
7301 unexport unreferenced symbols when --export-dynamic. Call
7302 _bfd_elf_strtab_delref when unexporting.
7303
7304 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
7305
7306 * bfd-in.h: Include <stdbool.h> if it is available.
7307 * bfd-in2.h: Regenerated.
7308
7309 2002-01-31 Alan Modra <amodra@bigpond.net.au>
7310
7311 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
7312 not go via the plt.
7313
7314 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
7315
7316 * archures.c: Tidy up formatting of embedded comments.
7317 * bfd.c: Tidy up formatting of embedded comments.
7318 * bfd-in.h: Fix formatting of comments.
7319 * reloc.c: Tidy up formatting of ordinary & embedded comments.
7320 * section.c: Tidy up formatting of embedded comments.
7321 * syms.c: Tidy up formatting of embedded comments.
7322 * targets.c: Tidy up formatting of embedded comments.
7323
7324 * bfd-in2.h: Regenerate.
7325
7326 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
7327
7328 * vms-tir.c (cmd_name): New function.
7329 (tir_cmd_name): New function.
7330 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
7331 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
7332 Fix formatting.
7333
7334 * peXXigen.c (pe_print_idata): Rearrange message to aid in
7335 translation.
7336 (pe_print_pdata): Rearrange message to aid in translation.
7337
7338 * libbfd.c (warn_deprecated): Rearrange error message to aid in
7339 translation.
7340
7341 * ihex.c (ihex_write_object_contents): Fix spelling typo.
7342
7343 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
7344
7345 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
7346 message to aid in translation.
7347
7348 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
7349 to aid in translation.
7350
7351 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
7352
7353 2002-01-30 Philipp Thomas <pthomas@suse.de>
7354
7355 * coff-arm.c, elf32-elf.h: Unify messages.
7356
7357 2002-01-30 Nick Clifton <nickc@redhat.com>
7358
7359 * po/sv.po: Updated translation.
7360
7361 2002-01-30 Philipp Thomas <pthomas@suse.de>
7362
7363 * dwarf2.c (read_abbrev): Use full section name in error message.
7364 (decode_line_info): Likewise.
7365
7366 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
7367 message.
7368
7369 2002-01-30 Alan Modra <amodra@bigpond.net.au>
7370
7371 * elf64-ppc.c (func_desc_adjust): Only provide missing function
7372 descriptor symbols for undefined function code syms. Clear
7373 ELF_LINK_NON_ELF so that they can stay weak.
7374
7375 2002-01-29 Chris Demetriou <cgd@broadcom.com>
7376 Mitch Lichtenberg <mpl@broadcom.com>
7377
7378 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
7379 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
7380 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
7381 generation.
7382 * bfd-in2.h: Regenerate.
7383
7384 2002-01-29 Chris Demetriou <cgd@broadcom.com>
7385
7386 * elf32-mips.c: Add additional comments about HI16 relocation
7387 processing.
7388 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
7389 pc-relative relocations. (Reverts change made on 2001-10-31.)
7390 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
7391 for pc-relative relocations.
7392 (mips_elf_calculate_relocation): Add a comment about a kludge
7393 in the R_MIPS_GNU_REL_HI16 handling.
7394 (_bfd_mips_elf_relocate_section): Implement that kludge;
7395 adjust pc-relative HI16 relocation for difference in HI16 and
7396 LO16 addresses, since it can't easily be done in
7397 mips_elf_calculate_relocation.
7398
7399 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
7400
7401 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
7402 relocations with PC32 relocations for undefined or weak symbols.
7403 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
7404 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
7405
7406 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
7407
7408 * elfcore.h (elf_core_file_p): Improve comment for last change.
7409
7410 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
7411
7412 * configure: Regenerated.
7413
7414 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
7415
7416 * elfcore.h (elf_core_file_p): Set the machine architecture
7417 before processing the program headers.
7418
7419 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
7420
7421 * configure.in <64-bit configuration>: If using gcc, check and
7422 emit error for egcs-1.1.2.
7423 * configure: Regenerate.
7424
7425 2002-01-26 Egor Duda <deo@logos-m.ru>
7426
7427 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
7428 as possible to avoid stack corruption.
7429
7430 2002-01-26 Richard Henderson <rth@redhat.com>
7431
7432 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
7433 for non-allocated sections.
7434
7435 2002-01-25 Mark Kettenis <kettenis@gnu.org>
7436
7437 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
7438 prstat.pr_reg even if it is a struct.
7439
7440 2002-01-25 Steve Ellcey <sje@cup.hp.com>
7441
7442 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
7443
7444 2002-01-25 Philipp Thomas <pthomas@suse.de>
7445
7446 * coffgen.c (coff_print_symbol): Don't mark info message
7447 for translation.
7448
7449 2002-01-25 Nick Clifton <nickc@redhat.com>
7450
7451 * po/fr.po: Updated translation.
7452 * po/es.po: Updated translation.
7453
7454 2002-01-25 Philipp Thomas <pthomas@suse.de>
7455
7456 * coff-alpha.c (alpha_relocate_section): Unify warning message
7457 for GP relative relocations without GP defined.
7458 * coff-mips.c (mips_relocate_section): Likewise.
7459
7460 2002-01-25 Alan Modra <amodra@bigpond.net.au>
7461
7462 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
7463 unsigned overflow when new_offset < old_offset.
7464
7465 2002-01-24 Philipp Thomas <pthomas@suse.de>
7466
7467 * bfd.c (_bfd_abort): Fix typo.
7468
7469 2002-01-23 Richard Henderson <rth@redhat.com>
7470
7471 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
7472 plt entries for undefweak symbols.
7473
7474 2002-01-23 Steve Ellcey <sje@cup.hp.com>
7475
7476 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
7477 (bfd_elf64_ia64_hpux_big_vec): Ditto.
7478 (bfd_elf32_h8300_vec): Ditto.
7479
7480 2002-01-23 Alan Modra <amodra@bigpond.net.au>
7481
7482 * elf64-ppc.c: Remove stale part of ABI comment.
7483 (NO_OPD_RELOCS): Define.
7484 (ppc64_elf_check_relocs): Use it.
7485 (ppc64_elf_relocate_section): Here too.
7486 (build_one_stub): Don't point function syms at the stub. Instead,
7487 hijack plt.offset.
7488 (ppc64_elf_relocate_section): Check whether REL24 relocs should
7489 really go to the stub. Make all dynamic relocs in opd against
7490 locals.
7491 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
7492 plt.offset.
7493
7494 2002-01-22 Richard Henderson <rth@redhat.com>
7495
7496 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
7497
7498 2002-01-22 Alan Modra <amodra@bigpond.net.au>
7499
7500 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
7501 TOC_BASE_OFF adjustment.
7502
7503 * Makefile.am: Run "make dep-am".
7504 * Makefile.in: Regenerate.
7505 * po/SRC-POTFILES.in: Regenerate.
7506
7507 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
7508
7509 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
7510 host defines.
7511
7512 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
7513
7514 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
7515 Check for and emit error if sgot is NULL at this point.
7516
7517 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
7518
7519 * config.bfd (ia64*-*-netbsd*): New target.
7520
7521 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
7522
7523 * som.c (som_write_space_strings): Comment typo fix.
7524
7525 2002-01-21 Alan Modra <amodra@bigpond.net.au>
7526
7527 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
7528 is_func_descriptor fields.
7529 (link_hash_newfunc): Init them.
7530 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
7531 dot are candidates for plt entries. When processing .opd relocs,
7532 set function descriptor strings to point inside function code
7533 string, and set new ppc_link_hash_entry fields.
7534 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
7535 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
7536 function descriptors. It's now done in..
7537 (func_desc_adjust): New.
7538 (ppc64_elf_func_desc_adjust): New.
7539 (define elf_backend_always_size_sections): Define.
7540 (ppc64_elf_hide_symbol): New.
7541 (define elf_backend_hide_symbol): Define.
7542 (allocate_dynrelocs): Remove code looking up function descriptors
7543 as that has been done earlier.
7544 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
7545 table.
7546 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
7547 up function descriptor.
7548 (build_one_stub): Look up the function code sym. Check for
7549 invalid plt offsets.
7550 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
7551 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
7552
7553 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
7554 boolean param.
7555 (_bfd_elf_link_hash_hide_symbol): Likewise.
7556 * elflink.h (elf_link_add_object_symbols): Adjust call to
7557 elf_backend_hide_symbol.
7558 (elf_fix_symbol_flags): Likewise.
7559 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
7560 than bfd_alloc.
7561 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
7562 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
7563 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
7564 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
7565 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
7566 and adjust to suit.
7567 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
7568 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
7569 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
7570
7571 2002-01-18 Alan Modra <amodra@bigpond.net.au>
7572
7573 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
7574 dynamic function descriptor symbol, not the associated function
7575 symbol.
7576
7577 2002-01-17 Eric Christopher <echristo@redhat.com>
7578
7579 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
7580
7581 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
7582
7583 * po/bfd.pot: Regenerate.
7584 * po/fr.po: Regenerate.
7585
7586 2002-01-17 Alan Modra <amodra@bigpond.net.au>
7587
7588 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
7589 Remove "Elf_Internal_Shdr *" param.
7590 (_bfd_mips_elf_section_from_bfd_section): Ditto.
7591 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
7592 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
7593 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
7594 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
7595 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
7596 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
7597 function to override special sections. Remove hdr arg from
7598 backend call, and don't loop.
7599
7600 2002-01-16 Eric Christopher <echristo@redhat.com>
7601
7602 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
7603 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
7604 relocations requiring gp0 and gp.
7605
7606 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
7607
7608 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
7609 EF_ARM_VFP_FLOAT.
7610 (elf32_arm_print_private_bfd_data): Likewise.
7611
7612 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
7613
7614 * po/tr.po: Import new version.
7615
7616 2002-01-16 Alan Modra <amodra@bigpond.net.au>
7617
7618 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
7619 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
7620 (ORI_R0_R0_0): Correct.
7621
7622 2002-01-16 Alan Modra <amodra@bigpond.net.au>
7623
7624 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
7625 when plt_not_loaded.
7626 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
7627 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
7628 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
7629 (ppc64_elf_glink_code): Delete.
7630 (PPC64_ELF_GLINK_SIZE): Delete.
7631 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
7632 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
7633 ORI_R0_R0_0): Define.
7634 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
7635 (struct ppc_link_hash_table): Add sstub and plt_overflow.
7636 (ppc64_elf_link_hash_table_create): Init them.
7637 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
7638 Don't copy to shared lib.
7639 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
7640 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
7641 (allocate_dynrelocs <plt>): Don't change function sym here. Make
7642 room for .stub and .glink code.
7643 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
7644 DT_PPC64_GLINK.
7645 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
7646 bfd_elf64_bfd_final_link.
7647 (bfd_elf64_bfd_final_link): Don't define.
7648 (ppc64_elf_size_stubs): New.
7649 (build_plt_stub): New.
7650 (build_one_stub): New.
7651 (ppc64_elf_build_stubs): New.
7652 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
7653 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
7654 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
7655 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
7656 case output sections not separate. Adjust DT_RELASZ to not
7657 include plt relocs. Set reserved got entry. Set got and plt
7658 entry size.
7659 (elf_backend_got_header_size): Set to 8.
7660 * elf64-ppc.h: New file.
7661
7662 2002-01-16 Alan Modra <amodra@bigpond.net.au>
7663
7664 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
7665 sections, use bfd_section_list_remove.
7666 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
7667 * elflink.h (elf_link_add_object_symbols): When removing all
7668 sections, use bfd_section_list_clear.
7669
7670 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
7671
7672 * po/sv.po: New file: Swedish translation.
7673 * configure.in (ALL_LINGUAS): Add sv.
7674 * configure: Regenerate.
7675
7676 2002-01-15 Jakub Jelinek <jakub@redhat.com>
7677
7678 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
7679 * elf.c (merge_sections_remove_hook): New function.
7680 (_bfd_elf_merge_sections): Pass it as 3rd argument to
7681 _bfd_merge_sections.
7682 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
7683 * libbfd.h: Rebuilt.
7684 * merge.c (_bfd_merge_sections): Add remove_hook argument.
7685 Call remove_hook if a SEC_EXCLUDE section is encountered.
7686
7687 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
7688
7689 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
7690 (xstormy16_reloc_map): Initialise new field with correct howto
7691 table.
7692 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
7693 howto entry.
7694
7695 2002-01-10 Michael Snyder <msnyder@redhat.com>
7696
7697 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
7698 (elfcore_write_pstatus): Use long instead of pid_t;
7699 * elf-bfd.h: Change prototypes to use long instead of pid_t;
7700
7701 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
7702
7703 * elf.c: Update copyright years.
7704 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
7705 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
7706
7707 2002-01-08 Michael Snyder <msnyder@redhat.com>
7708
7709 Add capability to write corefile note sections, for gdb.
7710 * elf.c (elfcore_write_note): New function.
7711 (elfcore_write_prpsinfo): New function.
7712 (elfcore_write_prstatus): New function.
7713 (elfcore_write_pstatus): New function.
7714 (elfcore_write_prfpreg): New function.
7715 (elfcore_write_prxfpreg): New function.
7716 * elf-bfd.h: Add prototypes for above functions.
7717
7718 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
7719
7720 * elf.c (elf_fake_sections): Propagate errors from
7721 elf_backend_fake_section.
7722
7723 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
7724
7725 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
7726 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
7727 (elf32-sh-nbsd.lo): New rule.
7728 * Makefile.in: Regenerate.
7729 * config.bfd (sh*le-*-netbsdelf*): New target.
7730 (sh*-*-netbsdelf*): New target.
7731 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
7732 (bfd_elf32_shnbsd_vec): New vector.
7733 (bfd_elf32_shlnbsd_vec): New vector.
7734 * configure: Regenerate.
7735 * elf32-sh-nbsd.c: New file.
7736 * targets.c: Update copyright years.
7737 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
7738 bfd_elf32_shnbsd_vec.
7739
7740 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
7741
7742 * coff-rs6000.c (READ20): Use bfd_scan_vma.
7743
7744 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
7745
7746 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
7747 of a symbol in a section that will be deleted.
7748
7749 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
7750
7751 * po/es.po: New file: Spanish translation.
7752 * configure.in (ALL_LINGUAS): Add es.
7753 * configure: Regenerate.
7754
7755 2002-01-06 Steve Ellcey <sje@cup.hp.com>
7756
7757 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
7758 argument so we can handle HP-UX specially.
7759 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
7760 (elfNN_hpux_backend_section_from_bfd_section): New for support
7761 of SHN_IA_64_ANSI_COMMON.
7762 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
7763 (is_unwind_section_name): Add special HP-UX support.
7764 (elfNN_ia64_section_from_shdr): Add support for more sections.
7765 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
7766 add support for more sections.
7767 (elfNN_ia64_additional_program_headers): Modify
7768 is_unwind_section_name call.
7769 (elfNN_ia64_modify_segment_map): Remove assumption that there is
7770 only one unwind section in segment.
7771
7772 2002-01-06 Alan Modra <amodra@bigpond.net.au>
7773
7774 * syms.c (_bfd_generic_make_empty_symbol): New function.
7775 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
7776 _bfd_generic_make_empty_symbol.
7777 * libbfd.h: Regenerate.
7778 * bfd-in2.h: Regenerate.
7779 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
7780 (hppabsd_core_get_symtab_upper_bound): Don't define.
7781 (hppabsd_core_get_symtab): Likewise.
7782 (hppabsd_core_print_symbol): Likewise.
7783 (hppabsd_core_get_symbol_info): Likewise.
7784 (hppabsd_core_bfd_is_local_label_name): Likewise.
7785 (hppabsd_core_get_lineno): Likewise.
7786 (hppabsd_core_find_nearest_line): Likewise.
7787 (hppabsd_core_bfd_make_debug_symbol): Likewise.
7788 (hppabsd_core_read_minisymbols): Likewise.
7789 (hppabsd_core_minisymbol_to_symbol): Likewise.
7790 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
7791 Formatting fixes.
7792 * hpux-core.c: Similarly.
7793 * irix-core.c: Similarly.
7794 * osf-core.c: Similarly.
7795 * sco5-core.c: Similarly.
7796 * binary.c (binary_make_empty_symbol): Remove function, define as
7797 _bfd_generic_make_empty_symbol.
7798 * ihex.c (ihex_make_empty_symbol): Likewise.
7799 * mmo.c (mmo_make_empty_symbol): Likewise.
7800 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
7801 * srec.c (srec_make_empty_symbol): Likewise.
7802 * versados.c (versados_make_empty_symbol): Likewise.
7803 * vms.c (_bfd_vms_make_empty_symbol): Remove.
7804 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
7805 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
7806 rather than _bfd_vms_make_empty_symbol.
7807 * vms-misc.c (new_symbol): Likewise.
7808
7809 2002-01-05 Alan Modra <amodra@bigpond.net.au>
7810
7811 * section.c (bfd_section_init): Remove unnecessary initialisations.
7812 (bfd_section_list_clear): New function.
7813 (bfd_section_list_remove, bfd_section_list_insert): New macros.
7814 (_bfd_strip_section_from_output): Use them.
7815 * coffcode.h (coff_set_alignment_hook): Likewise.
7816 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
7817 * elf64-mips.c (mips_elf64_final_link): Likewise.
7818 * elf64-mmix.c (mmix_elf_final_link): Likewise.
7819 * sunos.c (sunos_add_dynamic_symbols): Likewise.
7820 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
7821 * bfd-in2.h: Regenerate.
7822
7823 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
7824 rather than doing our own section handling. Clean up after errors
7825 with bfd_release and bfd_section_list_clear. Handle unexpected
7826 flags.
7827 * aoutf1.h (sunos4_core_file_p): Likewise.
7828 * aix386-core.c (aix386_core_file_p): Likewise.
7829 * cisco-core.c (cisco_core_file_validate): Likewise.
7830 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
7831 * trad-core.c (trad_unix_core_file_p): Likewise.
7832
7833 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
7834 with bfd_release and bfd_section_list_clear.
7835 * hpux-core.c (hpux_core_core_file_p): Likewise.
7836 * irix-core.c (irix_core_core_file_p): Likewise.
7837 * lynx-core.c (lynx_core_file_p): Likewise.
7838 * osf-core.c (osf_core_core_file_p): Likewise.
7839 * rs6000-core.c (rs6000coff_core_p): Likewise.
7840 * sco5-core.c (sco5_core_file_p): Likewise.
7841
7842 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
7843 sign extension adjustments without conditionals.
7844
7845 2002-01-04 Jakub Jelinek <jakub@redhat.com>
7846
7847 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
7848 CIE at .eh_frame start is removed due to no FDEs referencing it.
7849
7850 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
7851
7852 * config.bfd (x86_64-*-netbsd*): New target.
7853 * configure.in (x86_64-*-netbsd*): Set COREFILE
7854 to netbsd-core.lo.
7855 * configure: Regenerated.
7856
7857 2002-01-03 Tom Rix <trix@redhat.com>
7858
7859 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
7860 for recent bfd_make_section_anyway change.
7861
7862 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
7863
7864 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7865 R_ARM_THM_PC11 reloc.
7866
7867 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
7868
7869 * configure.in (LINGUAS): Add ja.
7870 * configure: Regenerate.
7871 * po/ja.po: Import from translation project's web site.
7872
7873 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
7874
7875 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
7876 messages to ease translation into other languages.
7877
7878 For older changes see ChangeLog-0001
7879 \f
7880 Local Variables:
7881 mode: change-log
7882 left-margin: 8
7883 fill-column: 74
7884 version-control: never
7885 End:
This page took 0.262962 seconds and 3 git commands to generate.