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