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