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