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