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