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