Fix pc relocations.
[binutils-gdb.git] / bfd / ChangeLog
1 2002-06-17 Tom Rix <trix@redhat.com>
2
3 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
4 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
5 complain_overflow_bitfield.
6
7 2002-06-17 Alan Modra <amodra@bigpond.net.au>
8
9 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
10 (bfd_fdopenr): Likewise.
11 (bfd_openstreamr): Likewise.
12 (bfd_openw): Likewise.
13
14 * targets.c: Sort target vecs.
15 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
16 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
17 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
18 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
19 * configure.in: Sort target vecs. Add m88kmach3_vec.
20 * configure: Regenerate.
21
22 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
23
24 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
25 bpo_reloc_no to break sort order ties, not address of items.
26
27 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
28
29 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
30 Skip excluded sections in determing __gp value.
31 (elf_hppa_final_link_relocate): Use the symbol's address in
32 R_PARISC_FPTR64 relocations that don't need an opd entry.
33 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
34 (elf64_hppa_finalize_dynreloc): Likewise.
35 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
36 (elf64_hppa_finish_dynamic_symbol): Break up assert.
37
38 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
39
40 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
41 alignment for .bss, .data and .text sections so that sse and sse2
42 code will work.
43 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
44
45 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
46
47 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
48 sh[1234]*-elf*.
49
50 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
51
52 * elflink.h (elf_bfd_final_link): Improve error handling for missing
53 dynamic sections.
54
55 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
56 for a symbol that has no output section.
57 (allocate_dynrel_entries): Correct comment.
58 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
59 unless we want one.
60 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
61 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
62 with no section. Remove unnecessary parentheses.
63
64 2002-06-11 Tom Rix <trix@redhat.com>
65
66 * coffcode.h (coff_compute_section_file_positions): Add data
67 section to AIX loader alignment check.
68
69 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
70 alignment to 4 bytes.
71 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
72 power accessor macro.
73 (do_shared_object_padding): Remove invalid assertion.
74
75 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
76
77 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
78 for removed output sections.
79
80 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
81
82 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
83 htab_alloc.
84 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
85
86 2002-06-08 H.J. Lu <hjl@gnu.org>
87
88 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
89 work around a long long bug in gcc 2.96 on mips.
90
91 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
92
93 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
94 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
95 Regenerate dependency lists.
96 * Makefile.in: Regenerate.
97 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
98 vax1knetbsd_vec to targ_selvecs.
99 * configure.in: Add vax1knetbsd_vec.
100 * configure: Regenerate.
101 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
102 * vax1knetbsd.c: New file.
103 * vaxnetbsd.c: Update copyright years.
104 (TARGET_PAGE_SIZE): Set to 0x1000.
105 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
106
107 2002-06-08 Matt Thomas <matt@3am-software.com>
108
109 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
110
111 2002-06-08 Alan Modra <amodra@bigpond.net.au>
112
113 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
114
115 2002-06-08 Alan Modra <amodra@bigpond.net.au>
116
117 * Makefile.am: Run "make dep-am".
118 * Makefile.in: Regenerate.
119
120 * armnetbsd.c: Replace CONST with const.
121 * corefile.c: Likewise.
122 * elf32-dlx.c: Likewise.
123 * elf64-mips.c: Likewise.
124 * mmo.c: Likewise.
125 * ns32knetbsd.c: Likewise.
126
127 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
128 table is elf64-sparc.
129
130 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
131
132 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
133 Fix RELA addends to get not shifted in the result. Don't do special
134 handling of R_MIPS_64 for NewABI.
135
136 2002-06-07 Alan Modra <amodra@bigpond.net.au>
137
138 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
139 (NAME(aout,slurp_reloc_table)): Likewise.
140 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
141 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
142 (xcoff_write_archive_contents_big): Likewise.
143 (xcoff_generate_rtinit): Likewise.
144 (xcoff_generate_rtinit): Likewise, and check error return.
145 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
146 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
147 (coff_get_normalized_symtab): Likewise.
148 (coff_make_empty_symbol): Likewise.
149 (bfd_coff_set_symbol_class): Likewise.
150 * cofflink.c (coff_link_add_symbols): Likewise.
151 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
152 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
153 (bfd_ecoff_write_accumulated_debug): Likewise.
154 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
155 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
156 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
157 * ieee.c (do_with_relocs): Use bfd_zalloc.
158 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
159 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
160 (NAME(aout,slurp_reloc_table)): Likewise.
161 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
162 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
163 * som.c (som_build_and_write_symbol_table): Likewise.
164 (som_slurp_string_table): Likewise.
165 (som_slurp_symbol_table): Likewise.
166 (som_bfd_ar_write_symbol_stuff): Likewise.
167 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
168 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
169 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
170 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
171 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
172
173 2002-06-07 Alan Modra <amodra@bigpond.net.au>
174
175 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
176 "group" union.
177 (elf_group_name): Update.
178 (elf_group_id): Define.
179 (bfd_elf_set_group_contents): Declare.
180 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
181 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
182 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
183 that sym for the signature.
184 (_bfd_elf_compute_section_file_positions): Don't call
185 set_group_contents for "ld -r" case.
186 (swap_out_syms): Use bfd_zalloc.
187 * elflink.h (elf_link_add_archive_symbols): Likewise.
188 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
189 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
190
191 2002-06-07 Alan Modra <amodra@bigpond.net.au>
192
193 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
194 relocs in opd for non-shared too.
195
196 2002-06-06 Jeffrey Law <law@redhat.com
197
198 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
199 relocations.
200
201 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
202
203 * merge.c: Include libiberty.h.
204 * elf-strtab.c: Include libiberty.h.
205
206 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
207
208 * peXXigen.c (pe_print_idata): Remove unused variable.
209
210 2002-06-06 David Heine <dlheine@tensilica.com>
211
212 * elf.c (assign_file_positions_for_segments): Remove unallocated
213 sections from the section to segment mapping for PT_LOAD segments.
214 Update comment about empty loadable segments.
215
216 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
217
218 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
219 is within the .stabstr section.
220
221 2002-06-06 Alan Modra <amodra@bigpond.net.au>
222
223 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
224 are "const PTR", not "const PTR *".
225 (bfd_elf32_swap_symbol_in): Likewise.
226 (bfd_elf64_swap_symbol_in): Likewise.
227 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
228 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
229 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
230 (elf_link_add_object_symbols): Likewise.
231 (elf_link_record_local_dynamic_symbol): Likewise.
232 (elf_link_input_bfd): Likewise.
233 (elf_gc_mark): Likewise.
234 (elf_reloc_symbol_deleted_p): Likewise.
235 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
236 (mn10200_elf_relax_delete_bytes): Likewise.
237 (mn10200_elf_symbol_address_p): Likewise.
238 (mn10200_elf_get_relocated_section_contents): Likewise.
239 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
240 (mn10300_elf_relax_section): Likewise.
241 (mn10300_elf_relax_delete_bytes): Likewise.
242 (mn10300_elf_symbol_address_p): Likewise.
243 (mn10300_elf_get_relocated_section_contents): Likewise.
244 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
245 (elf32_h8_relax_delete_bytes): Likewise.
246 (elf32_h8_symbol_address_p): Likewise.
247 (elf32_h8_get_relocated_section_contents): Likewise.
248 * elf32-hppa.c (get_local_syms): Likewise.
249 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
250 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
251 * elf32-sh.c (sh_elf_relax_section): Likewise.
252 (sh_elf_relax_delete_bytes): Likewise.
253 (sh_elf_get_relocated_section_contents): Likewise.
254 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
255 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
256 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
257 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
258 * elf64-ppc.c (get_local_syms): Likewise.
259 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
260 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
261
262 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
263
264 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
265
266 2002-06-05 Alan Modra <amodra@bigpond.net.au>
267
268 * elf.c (group_signature): Swap in the whole symbol, and handle
269 extracting section symbol names.
270 (setup_group): Add comment.
271 (set_group_contents): When called from objcopy or ld, arrange for
272 section contents to be written. Write group member output section
273 indices to allow objcopy to reorganize sections.
274 (_bfd_elf_copy_private_section_data): Copy group info.
275
276 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
277 (bfd_elf32_swap_symbol_in): Update prototype.
278 (bfd_elf64_swap_symbol_in): Likewise.
279 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
280 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
281 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
282 (elf_link_add_object_symbols): Likewise.
283 (elf_link_record_local_dynamic_symbol): Likewise.
284 (elf_link_input_bfd): Likewise.
285 (elf_gc_mark): Likewise.
286 (elf_reloc_symbol_deleted_p): Likewise.
287 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
288 (mn10200_elf_relax_delete_bytes): Likewise.
289 (mn10200_elf_symbol_address_p): Likewise.
290 (mn10200_elf_get_relocated_section_contents): Likewise.
291 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
292 (mn10300_elf_relax_section): Likewise.
293 (mn10300_elf_relax_delete_bytes): Likewise.
294 (mn10300_elf_symbol_address_p): Likewise.
295 (mn10300_elf_get_relocated_section_contents): Likewise.
296 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
297 (elf32_h8_relax_delete_bytes): Likewise.
298 (elf32_h8_symbol_address_p): Likewise.
299 (elf32_h8_get_relocated_section_contents): Likewise.
300 * elf32-hppa.c (get_local_syms): Likewise.
301 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
302 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
303 * elf32-sh.c (sh_elf_relax_section): Likewise.
304 (sh_elf_relax_delete_bytes): Likewise.
305 (sh_elf_get_relocated_section_contents): Likewise.
306 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
307 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
308 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
309 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
310 * elf64-ppc.c (get_local_syms): Likewise.
311 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
312 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
313 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
314 * elf64-alpha.c (alpha_elf_size_info): Likewise.
315 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
316 * elf64-mips.c (mips_elf64_size_info): Likewise.
317 * elf64-s390.c (s390_elf64_size_info): Likewise.
318 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
319
320 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
321
322 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
323 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
324 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
325 _bfd_mips_elf_ignore_discarded_relocs.
326 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
327
328 2002-06-05 H.J. Lu <hjl@gnu.org>
329
330 * elfxx-mips.c (mips_elf_calculate_relocation): Call
331 _bfd_elf_rel_local_sym for STT_SECTION relocations against
332 the SEC_MERGE section.
333
334 2002-06-05 Alan Modra <amodra@bigpond.net.au>
335
336 * coff-alpha.c: Update copyright date.
337 * coff-mips.c: Likewise.
338 * xcoff-target.h: Likewise.
339
340 * bfd-in.h: Remove "taken from the source" comment.
341 * libbfd-in.h: Likewise.
342 * libcoff-in.h: Likewise.
343 * bfd-in2.h: Regenerate.
344 * libbfd.h: Regenerate.
345 * libcoff.h: Regenerate.
346
347 * elf.c (bfd_elf_discard_group): Return true.
348 * elf-bfd.h (bfd_elf_discard_group): Declare.
349 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
350 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
351 * bfd.c (bfd_discard_group): Define.
352 * targets.c (struct bfd_target): Add _bfd_discard_group.
353 (BFD_JUMP_TABLE_LINK): Here too.
354 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
355 * aout-adobe.c (aout_32_bfd_discard_group): Define.
356 * aout-target.h (MY_bfd_discard_group): Define.
357 * aout-tic30.c (MY_bfd_discard_group): Define.
358 * binary.c (binary_bfd_discard_group): Define.
359 * bout.c (b_out_bfd_discard_group): Define.
360 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
361 * coffcode.h (coff_bfd_discard_group): Define.
362 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
363 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
364 * i386msdos.c (msdos_bfd_discard_group): Define.
365 * i386os9k.c (os9k_bfd_discard_group): Define.
366 * ieee.c (ieee_bfd_discard_group): Define.
367 * ihex.c (ihex_bfd_discard_group): Define.
368 * mmo.c (mmo_bfd_discard_group): Define.
369 * nlm-target.h (nlm_bfd_discard_group): Define.
370 * oasys.c (oasys_bfd_discard_group): Define.
371 * ppcboot.c (ppcboot_bfd_discard_group): Define.
372 * som.c (som_bfd_discard_group): Define.
373 * srec.c (srec_bfd_discard_group): Define.
374 * tekhex.c (tekhex_bfd_discard_group): Define.
375 * versados.c (versados_bfd_discard_group): Define.
376 * vms.c (vms_bfd_discard_group): Define.
377 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
378 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
379 (aix5coff64_vec): Likewise.
380 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
381
382 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
383
384 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
385 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
386 (elf32-sh64-com.lo): New dependency list.
387 * Makefile.in: Regenerate.
388 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
389 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
390 elf32-sh64-com.lo.
391 * configure: Regenerate.
392 * elf32-sh64.c (sh64_address_in_cranges)
393 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
394 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
395 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
396 * elf32-sh64-com.c: ...here. New file.
397
398 2002-06-04 Alan Modra <amodra@bigpond.net.au>
399
400 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
401 ATTRIBUTE_UNUSED on used params.
402 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
403 before calling bfd_section_from_elf_index on local syms.
404 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
405
406 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
407
408 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
409 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
410 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
411 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
412 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
413 * Makefile.in: Regenerate.
414 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
415 (sh64-*-netbsd*): New targets.
416 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
417 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
418 * configure: Regenerate.
419 * elf32-sh64-nbsd.c: New file.
420 * elf64-sh64-nbsd.c: New file.
421 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
422 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
423 bfd_elf64_sh64lnbsd_vec.
424
425 2002-06-04 Alan Modra <amodra@bigpond.net.au>
426
427 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
428 (bfd_section_from_shdr): Likewise. Set section name of group
429 sections from signature.
430 (group_signature): Split out from setup_group. Ensure symbol table
431 is available.
432 (bfd_elf_discard_group): New function.
433 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
434 .gnu.linkonce* sections if they are members of a group.
435 (set_group_contents): Set GRP_COMDAT flag.
436 * section.c (bfd_discard_group): New function.
437 * bfd-in.h (bfd_elf_discard_group): Declare.
438 * bfd-in2.h: Regenerate.
439 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
440 (elf_linkonce_p): Define.
441
442 2002-06-04 Alan Modra <amodra@bigpond.net.au>
443
444 * elf.c (bfd_section_from_shdr): Make "name" const.
445 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
446 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
447 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
448 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
449 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
450 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
451 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
452 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
453 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
454 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
455 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
456
457 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
458
459 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
460 ABI.
461
462 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
463
464 * elf32-arc.c: Fix formatting.
465 * elf32-arm.h: Likewise.
466 * elf32-cris.c: Likewise.
467 * elf32-dlx.c: Likewise.
468 * elf32-hppa.c: Likewise.
469 * elf32-i386.c: Likewise.
470 * elf32-i386qnx.c: Likewise.
471 * elf32-or32.c: Likewise.
472 * elf32-s390.c: Likewise.
473 * elf32-sh64.c: Likewise.
474 * elf32-vax.c: Likewise.
475 * elf32-xstormy16.c: Likewise.
476 * elf64-alpha.c: Likewise.
477 * elf64-mmix.c: Likewise.
478 * elf64-ppc.c: Likewise.
479 * elf64-s390.c: Likewise.
480 * elf64-sh64.c: Likewise.
481 * elf64-x86-64.c: Likewise.
482
483 2002-06-02 Richard Henderson <rth@redhat.com>
484
485 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
486 null when there are no got entries for a symbol.
487 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
488 uninitialized variable warning.
489
490 2002-06-01 Richard Henderson <rth@redhat.com>
491
492 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
493 undefined symbols here.
494 (elf64_alpha_relax_section): Do it here. Also test for not
495 defined in the current module.
496 (elf64_alpha_relocate_section_r): Split out of ...
497 (elf64_alpha_relocate_section): ... here. Don't dereference
498 NULL when looking up local got entries.
499
500 2002-06-01 Richard Henderson <rth@redhat.com>
501
502 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
503 symbols from JSR relaxation.
504 (elf64_alpha_size_plt_section_1): New.
505 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
506 (elf64_alpha_size_rela_got_1): ... here.
507 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
508 (elf64_alpha_size_rela_got_section): ... here.
509 (elf64_alpha_size_plt_section): New.
510 (elf64_alpha_relax_section): Call them.
511 (elf64_alpha_size_got_sections): Remove output_bfd arg.
512 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
513
514 2002-06-01 Richard Henderson <rth@redhat.com>
515
516 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
517 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
518 in shared libraries. Fix DTPRELHI and TPRELHI value.
519 (INSN_ADDQ, INSN_RDUNIQ): New.
520 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
521 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
522 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
523 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
524 Handle GOTDTPREL and GOTTPREL relocations.
525 (elf64_alpha_relax_gprelhilo): New.
526 (elf64_alpha_relax_tls_get_addr): New.
527 (elf64_alpha_relax_find_tls_segment): New.
528 (elf64_alpha_relax_section): Handle TLS relocations.
529 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
530 (elf64_alpha_check_relocs): Set it.
531
532 2002-06-01 Richard Henderson <rth@redhat.com>
533
534 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
535
536 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
537 check; don't suppress dynamic relocs for non-allocated sections.
538
539 * elf64-alpha.c: Remove dead code.
540
541 2002-05-31 Alan Modra <amodra@bigpond.net.au>
542
543 * bfd-in2.h: Regenerate.
544 * libbfd.h: Regenerate.
545 * po/SRC-POTFILES.in: Regenerate.
546
547 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
548 space for bss .plt.
549
550 2002-05-31 Graeme Peterson <gp@qnx.com>
551
552 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
553 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
554 Run "make dep-am".
555 * Makefile.in: Regenerate.
556 * config.bfd: Add i[3456]86-*-nto-qnx* support.
557 * configure.in: Add bfd_elf32_i386qnx_vec support.
558 * configure: Regenerate.
559 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
560 is_contained_by_filepos, and copy_private_bfd_data_p.
561 * elf.c (assign_file_positions_for_segments): Call backend
562 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
563 (IS_CONTAINED_BY_FILEPOS): Define.
564 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
565 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
566 Fix non-K&R call to _bfd_error_handler.
567 (_bfd_elf_copy_private_section_data): Use backend
568 copy_private_bfd_data_p.
569 * elf32-i386.c: Don't include elfxx-target.h when
570 ELF32_I386_C_INCLUDED is defined.
571 * elf32-i386qnx.c: New QNX elf backend file.
572 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
573 elf_backend_is_contained_by_filepos, and
574 elf_backend_do_copy_private_bfd_data.
575 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
576
577 2002-05-31 Alan Modra <amodra@bigpond.net.au>
578
579 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
580 Move other similar defines to start of file.
581
582 2002-05-30 Tom Rix <trix@redhat.com>
583
584 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
585 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
586
587 2002-05-30 Richard Henderson <rth@redhat.com>
588
589 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
590 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
591 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
592 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
593 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
594 (struct alpha_elf_obj_tdata): Rename total_got_entries and
595 n_local_got_entries to total_got_size and local_got_size.
596 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
597 (alpha_got_entry_size): New.
598 (elf64_alpha_relax_with_lituse): Use it.
599 (elf64_alpha_relax_without_lituse): Likewise.
600 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
601 (get_got_entry): New.
602 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
603 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
604 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
605 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
606 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
607 (elf64_alpha_calc_got_offsets): Likewise.
608 (alpha_dynamic_entries_for_reloc): New.
609 (elf64_alpha_calc_dynrel_sizes): Use it.
610 (elf64_alpha_size_dynamic_sections): Likewise.
611 (elf64_alpha_relocate_section): Handle TLS relocations.
612 * reloc.c: Add Alpha TLS relocations.
613 * bfd-in2.h, libbfd.h: Rebuild.
614
615 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
616
617 * peXXigen.c (pe_print_idata): Remove double printed
618 import table lines; add Bound-To comment.
619
620 2002-05-29 Matt Thomas <matt@3am-software.com>
621
622 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
623 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
624 (elf32-vax.lo): New rule.
625 * Makefile.in: Regenerate.
626 * configure.in (bfd_elf32_vax_vec)
627 (vaxnetbsd_vec): New vectors.
628 * configure: Regenerate.
629 * config.bfd (vax-*-netbsdelf*)
630 (vax-*-netbsdaout*)
631 (vax-*-netbsd*): New targets.
632 * elf32-vax.c: New file.
633 * reloc.c: Add VAX relocations.
634 * bfd-in2.h: Regenerate.
635 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
636
637 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
638
639 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
640 and bfd_elf32_bigarm_vec to targ_selvecs.
641
642 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
643
644 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
645 with auto-imported symbols.
646
647 2002-05-29 Adam Nemet <anemet@lnxw.com>
648
649 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
650 sections only record bfd.
651 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
652 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
653 * bfd-in2.h: Regenerate.
654
655 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
656
657 * syms.c (_bfd_stab_section_find_nearest_line): Move
658 declaration and initialisation of saw_line and saw_func out of
659 for loop.
660
661 2002-05-29 Alan Modra <amodra@bigpond.net.au>
662
663 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
664 (bfd_elf64_get_symbol_info): Define.
665 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
666
667 2002-05-29 Andrey Volkov <avolkov@transas.com>
668
669 * cpu-h8300.c: Make default h8300 machine first in machine list.
670
671 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
672
673 * config.bfd: Added DLX configuraton.
674 * Makefile.am: Added DLX configuraton.
675 * configure.in: Added DLX configuraton.
676 * archures.c: Add DLX architecure.
677 * reloc.c: Add DLX relocs.
678 * targets.c: Added DLX target vector.
679 * configure: Regenerate.
680 * Makefile.in: Regenreate.
681 * bfd-in2.h: Regenreate.
682 * elf32-dlx.c: New file: Support DLX target.
683 * cpu-dlx.c: New file: Support DLX target.
684
685 2002-05-25 Alan Modra <amodra@bigpond.net.au>
686
687 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
688
689 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
690 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
691 strings to point inside function code sym string.
692 (func_desc_adjust): Likewise.
693 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
694
695 2002-05-24 Michal Ludvig <mludvig@suse.cz>
696
697 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
698 (elf64_x86_64_grok_psinfo): Added.
699
700 2002-05-24 TAMURA Kent <kent@netbsd.org>
701
702 * config.bfd: Add a target for i386-netbsdpe.
703
704 2002-05-24 Alan Modra <amodra@bigpond.net.au>
705
706 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
707 and is_func_descriptor.
708 (func_desc_adjust): Hide function code sym in shared libs unless
709 there is a matching exported function descriptor sym.
710
711 2002-05-23 Jakub Jelinek <jakub@redhat.com>
712
713 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
714 for symbols from SHF_TLS section.
715 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
716 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
717 (map_sections_to_segments): Build PT_TLS segment if necessary.
718 (assign_file_positions_for_segments): Likewise.
719 (get_program_header_size): Account for PT_TLS segment.
720 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
721 SEC_THREAD_LOCAL sections to STT_TLS.
722 * reloc.c: Add 386 and IA-64 TLS relocs.
723 * section.c (SEC_THREAD_LOCAL): Define.
724 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
725 Remove.
726 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
727 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
728 unconditionally.
729 (struct elf_final_link_info): Add first_tls_sec.
730 (elf_bfd_final_link): Set first_tls_sec.
731 Compute elf_hash_table (info)->tls_segment.
732 (elf_link_output_extsym): Handle STT_TLS symbols.
733 (elf_link_input_bfd): Likewise.
734 * syms.c (BSF_THREAD_LOCAL): Define.
735 * bfd-in2.h: Rebuilt.
736 * libbfd.h: Rebuilt.
737 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
738 elf_i386_mkobject, elf_i386_object_p): New functions.
739 (elf_howto_table): Add TLS relocs.
740 (elf_i386_reloc_type_lookup): Support TLS relocs.
741 (elf_i386_info_to_howto_rel): Likewise.
742 (struct elf_i386_link_hash_entry): Add tls_type.
743 (struct elf_i386_obj_tdata): New.
744 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
745 New macros.
746 (struct elf_i386_link_hash_table): Add tls_ldm_got.
747 (link_hash_newfunc): Clear tls_type.
748 (elf_i386_check_relocs): Support TLS relocs.
749 (elf_i386_gc_sweep_hook): Likewise.
750 (allocate_dynrelocs): Likewise.
751 (elf_i386_size_dynamic_sections): Likewise.
752 (elf_i386_relocate_section): Likewise.
753 (elf_i386_finish_dynamic_symbol): Likewise.
754 (bfd_elf32_mkobject, elf_backend_object_p): Define.
755 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
756 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
757 want_tprel, want_dtpmod, want_dtprel.
758 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
759 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
760 R_IA64_LTOFF_TPREL22.
761 (elf_code_to_howto_index): Add TLS relocs.
762 (elfNN_ia64_check_relocs): Support TLS relocs.
763 (allocate_global_data_got): Account for TLS .got data.
764 (allocate_dynrel_entries): Account for TLS dynamic relocations.
765 (elfNN_ia64_install_value): Supprt TLS relocs.
766 (set_got_entry): Support TLS relocs.
767 (elfNN_ia64_relocate_section): Likewise.
768
769 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
770
771 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
772 BLX reloc round the relocation up rather than down.
773 * coff-arm.c (coff_arm_relocate_section): Likewise.
774
775 2002-05-21 H.J. Lu (hjl@gnu.org)
776
777 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
778 definition.
779
780 2002-05-22 Alan Modra <amodra@bigpond.net.au>
781
782 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
783 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
784
785 2002-05-22 Alan Modra <amodra@bigpond.net.au>
786
787 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
788 unresolved relocs.
789 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
790
791 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
792
793 * bfd/bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
794 non-ELF targets.
795
796 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
797
798 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
799 an error value.
800 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
801 return with false on error.
802 (elf_link_input_bfd): Check reloc_emitter return value.
803
804 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
805
806 * config.bfd (armeb-*-netbsdelf*): New target.
807
808 2002-05-20 Alan Modra <amodra@bigpond.net.au>
809
810 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
811 at the plt call stub.
812
813 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
814
815 * cpu-mips.c (mips_compatible): Don't try to check machine
816 compatibility.
817
818 2002-05-18 Tom Rix <trix@redhat.com>
819
820 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
821
822 2002-05-17 Alan Modra <amodra@bigpond.net.au>
823
824 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
825 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
826 we've already warned about an undefined symbol. Report more
827 detail on reloc errors.
828
829 2002-05-17 Alan Modra <amodra@bigpond.net.au>
830
831 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
832 * configure.in: Invoke AM_INSTALL_LIBBFD.
833 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
834 (install_libbfd): .. New target.
835 (uninstall_libbfd): Likewise.
836 (install-bfdlibLTLIBRARIES): Likewise.
837 (uninstall-bfdlibLTLIBRARIES): Likewise.
838 (bfdlibdir): New.
839 (bfdincludedir): New.
840 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
841 * aclocal.m4: Regenerate.
842 * configure: Regenerate.
843 * Makefile.in: Regenerate.
844
845 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
846
847 * hash.c (bfd_hash_lookup): Remove computation of len from inside
848 hash loop.
849
850 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
851
852 * config.bfd: Add targets for sh64-linux (little endian and
853 big endian).
854
855 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
856
857 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
858 is located in the same section as the import table. Instead
859 check, and if necessary load the section containing the thunk.
860
861 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
862
863 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
864 bfd_bread.
865 (xcoff64_core_file_matches_executable_p): Replace bfd_read
866 with bfd_bread.
867
868 2002-05-15 Alan Modra <amodra@bigpond.net.au>
869
870 * aix5ppc-core.c: Warning fixes.
871 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
872 * aout-target.h (MY_bfd_link_just_syms): Define.
873 * aout-tic30.c (MY_bfd_link_just_syms): Define.
874 * bfd.c (bfd_link_just_syms): Define.
875 * binary.c (binary_bfd_link_just_syms): Define.
876 * bout.c (b_out_bfd_link_just_syms): Define.
877 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
878 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
879 * coffcode.h (coff_bfd_link_just_syms): Define.
880 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
881 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
882 (_bfd_elf_link_just_syms): Declare.
883 * elf.c (_bfd_elf_link_just_syms): New function.
884 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
885 sections haven't already been discarded by the linker.
886 * elflink.h (elf_link_add_object_symbols): Likewise for stab
887 sections and SEC_MERGE sections.
888 (elf_bfd_discard_info): Similarly here.
889 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
890 * i386msdos.c (msdos_bfd_link_just_syms): Define.
891 * i386os9k.c (os9k_bfd_link_just_syms): Define.
892 * ieee.c (ieee_bfd_link_just_syms): Define.
893 * ihex.c (ihex_bfd_link_just_syms): Define.
894 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
895 (_bfd_generic_link_just_syms): Declare.
896 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
897 * linker.c (_bfd_generic_link_just_syms): New function.
898 * mmo.c (mmo_bfd_link_just_syms): Define.
899 * nlm-target.h (nlm_bfd_link_just_syms): Define.
900 * oasys.c (oasys_bfd_link_just_syms): Define.
901 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
902 * som.c (som_bfd_link_just_syms): Define.
903 * srec.c (srec_bfd_link_just_syms): Define.
904 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
905 (BFD_JUMP_TABLE_LINK): And here.
906 * tekhex.c (tekhex_bfd_link_just_syms): Define.
907 * versados.c (versados_bfd_link_just_syms): Define.
908 * vms.c (vms_bfd_link_just_syms): Define.
909 * libbfd.h: Regenerate.
910 * bfd-in2.h: Regenerate.
911
912 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
913
914 * elf32-mips.c: Remove superfluous definitions copied from
915 elfxx-mips.c.
916 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
917 SGIish vectors to check the special case.
918 (mips_elf_hi16_reloc): Fix comment.
919 (mips_elf_got16_reloc): Likewise.
920 (_bfd_mips_elf32_gprel16_reloc): Likewise.
921 (elf_reloc_map): Code cleanup.
922 (mips_reloc_map): Add comment.
923 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
924 (mips_elf32_rtype_to_howto): Likewise.
925 (mips_elf32_discard_info): Likewise.
926 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
927 lead to IRIX compatibility now.
928
929 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
930
931 * elfxx-mips.c: Call it IRIX, not Irix in comments.
932
933 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
934
935 * config.bfd (shle-*-netbsdelf*): Add target which includes
936 sh64 support.
937
938 2002-05-13 David Edelsohn <edelsohn@gnu.org>
939
940 * configure.in: Revert 2002-04-07. Instead, auto-configure
941 HAVE_ST_C_IMPL.
942 * configure: Regenerate.
943 * config.in: Regenerate.
944 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
945 or AIX_5_CORE.
946
947 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
948
949 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
950 corefiles as well.2
951 * configure: Regenerate.
952
953 2002-05-13 Alan Modra <amodra@bigpond.net.au>
954
955 * Makefile.am (install-data-local): Install headers to
956 $(exec_prefix)/include.
957 * Makefile.in: Regenerate.
958
959 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
960 Daniel Jacobowitz <drow@mvista.com>
961
962 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
963 map BFD_RELOC_RVA.
964
965 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
966
967 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
968 hppa*-*-openbsd*): New targets.
969 * configure.in (alpha*-*-openbsd*): Set COREFILE.
970 * configure: Regenerate.
971
972 2002-05-10 Tom Rix <trix@redhat.com>
973
974 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
975 xcoff64_ppc_relocate_section.
976 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
977 * libxcoff.h: Common xcoff_reloc_type function declaration.
978
979 2002-05-10 Alan Modra <amodra@bigpond.net.au>
980
981 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
982 added in 2002-05-09 commit.
983
984 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
985 don't look for stubs on all undefined syms.
986
987 2002-05-09 Alan Modra <amodra@bigpond.net.au>
988
989 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
990 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
991 pcrel_offset.
992
993 * elf32-i386.c (elf_howto_table): Comments.
994 (elf_i386_relocate_section): Handle more relocs for relocatable
995 linking and against SEC_MERGE sections.
996
997 2002-05-08 Alan Modra <amodra@bigpond.net.au>
998
999 * elf32-ppc.c (ppc_elf_create_got): New function.
1000 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
1001 _bfd_elf_create_dynamic_sections. Correct .plt flags.
1002 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
1003 _bfd_elf_create_got_section.
1004
1005 2002-05-07 Alan Modra <amodra@bigpond.net.au>
1006
1007 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
1008 * elfxx-target.h (elf_backend_rela_normal): Define.
1009 (elfNN_bed): Init rela_normal.
1010 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
1011 for section symbols here if rela_normal. Simplify abs section test.
1012 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
1013 return immediately. Remove code handling relocatable linking.
1014 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1015 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
1016 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1017 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
1018 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1019 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1020 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
1021 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1022 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1023 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1024 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1025 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1026 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1027 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1028 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
1029 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1030 * elf-m10200.c (elf_backend_rela_normal): Define.
1031 * elf-m10300.c (elf_backend_rela_normal): Define.
1032 * elf32-fr30.c (elf_backend_rela_normal): Define.
1033 * elf32-i370.c (elf_backend_rela_normal): Define.
1034 * elf32-i860.c (elf_backend_rela_normal): Define.
1035 * elf32-m68k.c (elf_backend_rela_normal): Define.
1036 * elf32-mcore.c (elf_backend_rela_normal): Define.
1037 * elf32-openrisc.c (elf_backend_rela_normal): Define.
1038 * elf32-ppc.c (elf_backend_rela_normal): Define.
1039 * elf32-s390.c (elf_backend_rela_normal): Define.
1040 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
1041 * elf64-ppc.c (elf_backend_rela_normal): Define.
1042 * elf64-s390.c (elf_backend_rela_normal): Define.
1043 * elf64-x86-64.c (elf_backend_rela_normal): Define.
1044 * elfxx-ia64.c (elf_backend_rela_normal): Define.
1045 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
1046 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
1047
1048 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
1049
1050 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
1051 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
1052
1053 2002-05-06 Alan Modra <amodra@bigpond.net.au>
1054
1055 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
1056 when not relocatable. Fix reloc_emitter call for K&R.
1057
1058 2002-05-04 Alan Modra <amodra@bigpond.net.au>
1059
1060 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
1061 reloading local sym addend mistakenly removed in 2002-05-01 change.
1062
1063 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
1064 (read_abbrevs): Change "offset" param to bfd_vma.
1065 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
1066 Change "abbrev_offset" to bfd_vma.
1067 (read_indirect_string): Use correct conversion chars in error
1068 message format string, cast bfd_vma's to unsigned long.
1069 (read_abbrevs): Likewise.
1070 (read_attribute_value): Likewise.
1071 (decode_line_info): Likewise.
1072 (scan_unit_for_functions): Likewise.
1073 (parse_comp_unit): Likewise.
1074
1075 2002-05-04 Tom Rix <trix@redhat.com>
1076
1077 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
1078 (coff_swap_reloc_out): Same.
1079 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
1080 (xcoff_swap_reloc_out): Same.
1081 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
1082 case some 16 bit relocs. Add reloc value to output.
1083 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
1084 R_RBR. Improve names.
1085 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
1086 (bfd_xcoff_backend_data): Update with new reloc swap names.
1087 (bfd_pmac_xcoff_backend_data) : Same.
1088 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
1089 (xcoff64_swap_reloc_out): Same.
1090 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
1091 R_POS. Add reloc value to output.
1092 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
1093 bit R_RBR. Improve names, masks.
1094 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
1095 (bfd_xcoff_backend_data): Update with new reloc swap names.
1096 (bfd_xcoff_aix5_backend_data) : Same.
1097
1098 2002-05-04 Alan Modra <amodra@bigpond.net.au>
1099
1100 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
1101 bfd_count top_index, input_list, all_local_syms.
1102 (elf32_hppa_setup_section_lists): New function, split from
1103 elf32_hppa_size_stubs.
1104 (elf32_hppa_next_input_section): Likewise.
1105 (group_sections): Likewise.
1106 (get_local_syms): Likewise.
1107 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
1108 stubs on undefined syms too.
1109 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
1110 Only access htab elf fields when we have an elf hash table.
1111 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
1112 (elf32_hppa_next_input_section): Declare.
1113
1114 2002-05-04 Bob Byrnes <byrnes@curl.com>
1115
1116 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
1117 _bfd_new_bfd.
1118
1119 2002-05-03 H.J. Lu (hjl@gnu.org)
1120
1121 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
1122 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
1123 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
1124 to hide a global symbol.
1125 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
1126 forced_local to true.
1127
1128 2002-05-02 Richard Henderson <rth@redhat.com>
1129
1130 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
1131 vs SHN_UNDEF to zero.
1132
1133 2002-05-02 Alan Modra <amodra@bigpond.net.au>
1134
1135 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
1136 16 bit reloc.
1137 <R_PPC64_SECTOFF_DS>: Likewise.
1138 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
1139 SECTOFF reloc.
1140 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
1141 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
1142 SECTOFF reloc.
1143
1144 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
1145 (ppc64_elf_ha_reloc): New function.
1146 (ppc64_elf_brtaken_reloc): New function.
1147 (ppc64_elf_sectoff_reloc): New function.
1148 (ppc64_elf_sectoff_ha_reloc): New function.
1149 (ppc64_elf_toc_reloc): New function.
1150 (ppc64_elf_toc_ha_reloc): New function.
1151 (ppc64_elf_toc64_reloc): New function.
1152 (ppc64_elf_unhandled_reloc): New function.
1153 (ppc64_elf_howto_raw): Use the above.
1154 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
1155 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
1156 <R_PPC64_SECTOFF_DS>: Likewise.
1157 (IS_ABSOLUTE_RELOC): Update.
1158 (struct ppc_link_hash_table): Add have_undefweak.
1159 (ppc64_elf_link_hash_table_create): Init.
1160 (func_desc_adjust): Set have_undefweak.
1161 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
1162 add the .sfpr blr when have_undefweak.
1163 (ppc64_elf_setup_section_lists): Check hash table flavour.
1164 (ppc64_elf_next_input_section): Move output_section->owner test to
1165 ppc64elf.em.
1166 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
1167 and relocatable test. Return TOCstart and don't set elf_gp.
1168 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
1169 offset calculation. Add assert on weak sym branch tweaks.
1170 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
1171 (ppc64_elf_toc): Declare.
1172 (ppc64_elf_next_input_section): Update.
1173
1174 2002-05-01 Alan Modra <amodra@bigpond.net.au>
1175
1176 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
1177 file_name.
1178
1179 2002-05-01 Alan Modra <amodra@bigpond.net.au>
1180
1181 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
1182 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
1183 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
1184 call branches. Correct undefined weak destination.
1185 (ppc64_elf_func_desc_adjust): Always create at least one blr in
1186 .sfpr, and correct case where either only savef* or restf* is
1187 needed.
1188
1189 Long branch stubs, multiple stub sections.
1190 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
1191 (ppc64_elf_next_input_section): Declare.
1192 * elf64-ppc.c: Move linker-only prototypes.
1193 (STUB_SUFFIX): Define.
1194 (enum ppc_stub_type): New.
1195 (struct ppc_stub_hash_entry): New.
1196 (struct ppc_branch_hash_entry): New.
1197 (struct ppc_link_hash_entry): Add stub_cache, oh.
1198 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
1199 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
1200 Rename plt_overflow to stub_error.
1201 (ppc_stub_hash_lookup): Define.
1202 (ppc_branch_hash_lookup): Define.
1203 (stub_hash_newfunc): New function.
1204 (branch_hash_newfunc): New function.
1205 (link_hash_newfunc): Init new fields.
1206 (ppc64_elf_link_hash_table_create): Likewise.
1207 (ppc64_elf_link_hash_table_free): New function.
1208 (ppc_stub_name): New function.
1209 (ppc_get_stub_entry): New function.
1210 (ppc_add_stub): New function.
1211 (create_linkage_sections): Use bfd_make_section_anyway. Create
1212 .branch_lt and .rela.branch_lt sections. Don't create .stub.
1213 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
1214 and set up for plt call stubs. Link func and func desc syms.
1215 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
1216 (func_desc_adjust): Avoid hash lookup when func desc sym available
1217 via shortcut, and set links when processing.
1218 (ppc64_elf_hide_symbol): Likewise.
1219 (allocate_dynrelocs): Don't allocate stub section here.
1220 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
1221 Remove sstub code.
1222 (ppc_type_of_stub): New function.
1223 (build_one_stub): Delete.
1224 (ppc_build_one_stub): New function.
1225 (ppc_size_one_stub): New function.
1226 (ppc64_elf_setup_section_lists): New function.
1227 (ppc64_elf_next_input_section): New function.
1228 (group_sections): New function.
1229 (get_local_syms): New function.
1230 (ppc64_elf_size_stubs): Rewrite.
1231 (ppc64_elf_build_stubs): Rewrite.
1232 (ppc64_elf_relocate_section): Look up stub entry for REL24
1233 relocs. Don't propagate REL14* to dynamic objects. Look for long
1234 branch stubs if REL14* or REL24 relocs won't reach.
1235 (bfd_elf64_bfd_link_hash_table_free): Define.
1236
1237 2002-04-30 Mark Mitchell <mark@codesourcery.com>
1238
1239 * bfd/config.bfd: Add support for powerpc-*-windiss.
1240
1241 2002-04-30 Tom Rix <trix@redhat.com>
1242
1243 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
1244 symbol names into the hash table.
1245
1246 2002-04-28 Tom Rix <trix@redhat.com>
1247
1248 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
1249 calulating relocations.
1250 (xcoff_complain_overflow) : Function table for relocation errors.
1251 (xcoff_ppc_relocate_section): Use relocation and complain function
1252 tables.
1253 (xcoff_complain_overflow_unsigned_func): New complain function.
1254 (xcoff_complain_overflow_signed_func): Same.
1255 (xcoff_complain_overflow_bitfield_func): Same.
1256 (xcoff_complain_overflow_dont_func): Same.
1257 (xcoff_reloc_type_crel): New recot function.
1258 (xcoff_reloc_type_br): Same.
1259 (xcoff_reloc_type_ba): Same.
1260 (xcoff_reloc_type_toc): Same.
1261 (xcoff_reloc_type_rel): Same.
1262 (xcoff_reloc_type_neg): Same.
1263 (xcoff_reloc_type_pos): Same.
1264 (xcoff_reloc_type_fail): Same.
1265 (xcoff_reloc_type_noop): Same.
1266 * libxcoff.h : Declare common parts for xcoff64.
1267 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
1268 and complain function tables.
1269
1270 2002-04-28 Alan Modra <amodra@bigpond.net.au>
1271
1272 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
1273 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
1274
1275 2002-04-26 Alan Modra <amodra@bigpond.net.au>
1276
1277 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
1278 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
1279
1280 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
1281 same as the output before calling elf_link_input_bfd.
1282
1283 * coffcode.h (coff_compute_section_file_positions): Set
1284 section_tail after shuffling section list.
1285
1286 2002-04-24 Christian Groessler <chris@groessler.org>
1287
1288 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
1289 addresses are 23bit with a special layout, not plain 32bit
1290 values. Prevent relocation of immediate values.
1291
1292 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
1293
1294 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
1295 MIPS-16 ASE flags are set, print something to indicate that.
1296
1297 2002-04-23 Alan Modra <amodra@bigpond.net.au>
1298
1299 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
1300 under which a plt call stub is used.
1301 (final_link_relocate): Similarly.
1302 (allocate_plt_static): Clear h-plabel except when plt entry is
1303 exclusively used for a plabel.
1304 (allocate_dynrelocs): Use the above to simplify plt sizing.
1305 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
1306 (elf32_hppa_link_hash_table_create): Init.
1307 (BL22_RP): Define.
1308 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
1309 (elf32_hppa_check_relocs): Set has_22bit_branch.
1310
1311 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
1312 (final_link_relocate): Likewise.
1313
1314 2002-04-22 Jakub Jelinek <jakub@redhat.com>
1315
1316 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
1317 search table if some FDE is DW_EH_PE_aligned encoded either.
1318 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
1319
1320 2002-04-22 Richard Smith <richard@ex-parrot.com>
1321 Jakub Jelinek <jakub@redhat.com>
1322
1323 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
1324 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
1325 encoded personality.
1326 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
1327 for CIE/FDE removal.
1328
1329 2002-04-20 Tom Rix <trix@redhat.com>
1330
1331 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
1332
1333 2002-04-20 Alan Modra <amodra@bigpond.net.au>
1334
1335 * archures.c (bfd_lookup_arch): Move the list order comment..
1336 (struct bfd_arch_info): ..to where it belongs.
1337 * bfd-in2.h: Regenerate.
1338
1339 * archures.c (bfd_lookup_arch): Add comment on list order.
1340 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
1341 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
1342 is always at head of list.
1343
1344 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
1345
1346 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
1347 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
1348 definition of these functions for ARM_WINCE builds as they are
1349 not used.
1350 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
1351 for ARM_WINCE builds.
1352
1353 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
1354
1355 * coff-arm.c (bfd_arm_process_before_allocation):
1356
1357 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
1358
1359 * cpu-sh.c (scan_mach): Delete.
1360 (arch_info_struct): Replace scan_mach with bfd_default_scan.
1361 (bfd_sh_arch): Likewise.
1362
1363 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
1364
1365 * ihex.c (ihex_write_object_contents): Fix check for records
1366 crossing 64K boundaries.
1367
1368 2002-04-16 Alan Modra <amodra@bigpond.net.au>
1369
1370 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
1371 type rather than just assuming entries are ELF.
1372 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
1373 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
1374 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
1375 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
1376 rather than elf_link_hash_entry.
1377
1378 2002-04-15 Richard Henderson <rth@redhat.com>
1379
1380 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
1381 n32 binaries.
1382
1383 2002-04-15 Michael Snyder <msnyder@redhat.com>
1384
1385 * opncls.c (bfd_close): Write contents if writeable.
1386 Minor formatting tidy-ups.
1387
1388 2002-04-15 Alan Modra <amodra@bigpond.net.au>
1389
1390 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
1391
1392 2002-04-12 Michael Snyder <msnyder@redhat.com>
1393
1394 * bfd-in.h (bfd_get_section_lma): New access macro.
1395 Minor white-space fix-up.
1396
1397 2002-04-12 Alan Modra <amodra@bigpond.net.au>
1398
1399 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
1400 header pad.
1401
1402 2002-04-09 DJ Delorie <dj@redhat.com>
1403
1404 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
1405
1406 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
1407
1408 * coffcode.h (coff_read_word): New.
1409 (coff_compute_checksum): New.
1410 (coff_apply_checksum): New.
1411 (coff_write_object_contents): Call coff_apply_checksum () to
1412 apply checksum to PE image.
1413
1414 2002-04-08 Randolph Chung <tausq@debian.org>
1415
1416 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
1417 (elf32_hppa_final_link): Split out sorting logic to..
1418 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
1419 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
1420
1421 2002-04-07 Andrew Cagney <ac131313@redhat.com>
1422
1423 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
1424 pattern.
1425 * configure: Re-generate.
1426
1427 2002-04-07 Andrew Cagney <ac131313@redhat.com>
1428
1429 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
1430 is greater or equal to 4.3.3.
1431 * configure: Regenerate.
1432 Fix PR gdb/344.
1433
1434 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
1435
1436 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
1437 R_CRIS_32_PCREL>: Fix typo in name.
1438 (cris_elf_check_relocs): Always create .rela.got here when
1439 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
1440 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
1441 assume it's created.
1442
1443 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
1444
1445 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
1446 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
1447 define.
1448 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
1449 * bfd.c (bfd_link_hash_table_free): Define.
1450 * binary.c (binary_bfd_link_hash_table_free): Define.
1451 * bout.c (b_out_bfd_link_hash_table_free): Define.
1452 * coff-rs6000.c (rs6000coff_vec): Include
1453 _bfd_generic_link_hash_table_free.
1454 (pmac_xcoff_vec): Likewise.
1455 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
1456 (aix5coff64_vec): Likewise.
1457 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
1458 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
1459 (bfd_elf32_bfd_link_hash_table_free): Define.
1460 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
1461 (bfd_elf32_bfd_link_hash_table_free): Define.
1462 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
1463 define.
1464 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
1465 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
1466 * ieee.c (ieee_bfd_link_hash_table_free): Define.
1467 * ihex.c (ihex_bfd_link_hash_table_free): Define.
1468 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
1469 (_bfd_generic_link_hash_table_free): Add prototype.
1470 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
1471 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
1472 * linker.c (_bfd_generic_link_hash_table_free): New function.
1473 * mmo.c (mmo_bfd_link_hash_table_free): Define.
1474 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
1475 * oasys.c (oasys_bfd_link_hash_table_free): Define.
1476 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
1477 * som.c (som_bfd_link_hash_table_free): Define.
1478 * srec.c (srec_bfd_link_hash_table_free): Define.
1479 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
1480 * versados.c (versados_bfd_link_hash_table_free): Define.
1481 * vms.c (vms_bfd_link_hash_table_free): New function.
1482 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
1483
1484 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
1485 instead of bfd_alloc.
1486 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
1487 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
1488 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
1489 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
1490 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
1491 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
1492 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
1493 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
1494 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
1495 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
1496 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
1497 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
1498 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
1499 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
1500 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
1501 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
1502 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
1503 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
1504 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
1505 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
1506 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
1507 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
1508 * m68klinux.c (linux_link_hash_table_create): Likewise.
1509 * sparclinux.c (linux_link_hash_table_create): Likewise.
1510 * sunos.c (sunos_link_hash_table_create): Likewise.
1511 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
1512
1513 * targets.c: Add _bfd_link_hash_table_free to xvec.
1514
1515 * bfd-in2.h: Regenerate.
1516 * libbfd.h: Regenerate.
1517 * libcoff.h: Regenerate.
1518
1519 2002-04-04 Alan Modra <amodra@bigpond.net.au>
1520
1521 * dep-in.sed: Cope with absolute paths.
1522 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
1523 Run "make dep-am".
1524 * Makefile.in: Regenerate.
1525 * coff-arm.c: Fix copyright date.
1526 * cpu-h8300.c: Likewise.
1527 * cpu-i370.c: Likewise.
1528 * cpu-s390.c: Likewise.
1529 * cpu-mips.c: Likewise.
1530 * po/SRC-POTFILES.in: Regenerate.
1531
1532 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1533
1534 * Makefile.am: Add elfxx-mips.c to the known backends.
1535 (elf32-mips.lo): remove dependency to coff/external.h.
1536 * Makefile.in: Regenerate.
1537 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
1538 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
1539 accordingly.
1540 * configure: Regenerate.
1541 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
1542 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
1543 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
1544 MIPS specific backend functions.
1545 * elf32-mips.c: Moved most code to elfxx-mips.c.
1546 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
1547 static.
1548 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
1549 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
1550 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
1551 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
1552 interface to allow selection of the right REL or RELA howto table.
1553 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
1554 static. Let it refuse n32 objects.
1555 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
1556 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
1557 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
1558 (elf32_mips_ignore_discarded_relocs): Rename from
1559 _bfd_elf32_mips_ignore_discarded_relocs.
1560 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
1561 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
1562 (elf_mips_howto_table_rela): Remove.
1563 * elf64-mips.c: Moved most code to elfxx-mips.c.
1564 (bfd_elf64_bfd_reloc_type_lookup): Make static.
1565 (mips_elf64_rtype_to_howto): New function.
1566 (mips_elf64_object_p): Likewise.
1567 (elf64_mips_irix_compat): Likewise.
1568 * elfxx-mips.c: New file containing common code merged together from
1569 elf32-mips.c and elf64-mips.c.
1570 * elfxx-mips.h: New file containing MIPS specific prototypes from
1571 elf-bfd.h.
1572 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
1573 elf_backend_mips_rtype_to_howto.
1574
1575 2002-04-04 Alan Modra <amodra@bigpond.net.au>
1576
1577 * srec.c (MAXCHUNK, Chunk): Revise comments.
1578 (srec_write_record): Correct buffer size.
1579 (srec_write_header): Do without intermediate buffer.
1580 (srec_write_section): Validate Chunk.
1581 (srec_write_terminator): Pass NULL instead of dummy buffer.
1582 (srec_write_symbols): Pass file and symbol names directly to
1583 bfd_bwrite so sprintf won't overflow buffer.
1584
1585 2002-04-03 Jakub Jelinek <jakub@redhat.com>
1586
1587 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
1588 PC relative relocs against hidden symbols.
1589 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1590
1591 2002-04-03 Alan Modra <amodra@bigpond.net.au>
1592
1593 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
1594 LMAs, loop over segments until p_vaddr and p_memsz specify an
1595 extent enclosing the section.
1596
1597 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
1598
1599 * ihex.c (ihex_write_object_contents): Do not allow records to
1600 cross a 64K boundary - wrap if necessary.
1601
1602 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
1603
1604 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
1605 which caused the returned LWP ID to always be 0.
1606
1607 2002-04-01 Richard Henderson <rth@redhat.com>
1608
1609 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
1610 (elf32_sparc_relocate_section): Use it to figure out when to
1611 initialize .got entries.
1612 * elf64-sparc.c: Similarly.
1613
1614 2002-03-28 Alan Modra <amodra@bigpond.net.au>
1615
1616 * linker.c (link_action): Ignore duplicate warning syms.
1617 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
1618 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
1619 (elf_adjust_dynamic_symbol): Likewise.
1620 (elf_export_symbol): Likewise.
1621 (elf_link_find_version_dependencies): Likewise.
1622 (elf_link_assign_sym_version): Likewise.
1623 (elf_link_sec_merge_syms): Likewise.
1624 (elf_link_output_extsym): Likewise.
1625 (elf_gc_sweep_symbol): Likewise.
1626 (elf_gc_propagate_vtable_entries_used): Likewise.
1627 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1628 (elf_gc_allocate_got_offsets): Likewise.
1629 (elf_collect_hash_codes): Likewise.
1630 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
1631 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
1632 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
1633 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
1634 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
1635 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
1636 (elf_cris_discard_excess_dso_dynamics): Likewise.
1637 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
1638 (mark_PIC_calls): Likewise.
1639 (allocate_plt_static): Likewise.
1640 (allocate_dynrelocs): Likewise.
1641 (readonly_dynrelocs): Likewise.
1642 * elf32-i386.c (allocate_dynrelocs): Likewise.
1643 (readonly_dynrelocs): Likewise.
1644 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
1645 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
1646 * elf32-mips.c (mips_elf_output_extsym): Likewise.
1647 (mips_elf_sort_hash_table_f): Likewise.
1648 (mips_elf_check_mips16_stubs): Likewise.
1649 * elf32-s390.c (allocate_dynrelocs): Likewise.
1650 (readonly_dynrelocs): Likewise.
1651 * elf32-sh.c (sh_elf_discard_copies): Likewise.
1652 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
1653 (xstormy16_relax_plt_realloc): Likewise.
1654 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
1655 (elf64_alpha_output_extsym): Likewise.
1656 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
1657 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
1658 (mips_elf64_check_mips16_stubs): Likewise.
1659 (mips_elf64_output_extsym): Likewise.
1660 * elf64-ppc.c (func_desc_adjust): Likewise.
1661 (allocate_dynrelocs): Likewise.
1662 (readonly_dynrelocs): Likewise.
1663 * elf64-s390.c (allocate_dynrelocs): Likewise.
1664 (readonly_dynrelocs): Likewise.
1665 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
1666 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1667 (readonly_dynrelocs): Likewise.
1668 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
1669 * aoutx.h (aout_link_write_other_symbol): Likewise.
1670 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
1671 (_bfd_coff_write_global_sym): Likewise.
1672 * i386linux.c (linux_tally_symbols): Likewise.
1673 * m68klinux.c (linux_tally_symbols): Likewise.
1674 * sparclinux.c (linux_tally_symbols): Likewise.
1675 * pdp11.c (aout_link_write_other_symbol): Likewise.
1676 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
1677 * xcofflink.c (xcoff_build_ldsyms): Likewise.
1678 (xcoff_write_global_symbol): Likewise.
1679
1680 * cofflink.c (_bfd_coff_final_link): Formatting.
1681 * cpu-mips.c (mips_compatible): Make static, prototype.
1682 * elf32-i386.c (elf_i386_check_relocs): Formatting.
1683 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
1684 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
1685 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
1686 (mips_elf64_final_link): Likewise.
1687 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
1688 prototype.
1689
1690 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
1691
1692 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
1693 (SWAP_OUT_RELOC_OFFSET): Define.
1694
1695 2002-03-27 Gregory Steuck <greg@nest.cx>
1696
1697 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
1698 terminating NULL if empty symbol table.
1699 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
1700
1701 2002-03-26 H.J. Lu (hjl@gnu.org)
1702
1703 * elflink.h (elf_link_input_bfd): Revert the last change since
1704 the gcc exception handling isn't fixed yet.
1705
1706 2002-03-26 H.J. Lu (hjl@gnu.org)
1707
1708 * elflink.h (elf_link_input_bfd): Complain about relocations
1709 against local symbols in discarded sections.
1710
1711 2002-03-26 Alan Modra <amodra@bigpond.net.au>
1712
1713 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
1714
1715 2002-03-23 Alan Modra <amodra@bigpond.net.au>
1716
1717 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
1718 section file offset for !SEC_LOAD sections.
1719
1720 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
1721
1722 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
1723 <case R_ARM_GOT>): Handle relocations to Thumb functions.
1724
1725 2002-03-21 Alan Modra <amodra@bigpond.net.au>
1726
1727 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
1728 Whitespace changes.
1729 * archive.c: Update copyright date.
1730 * bfd-in2.h: Regenerate.
1731 * libbfd.h: Regenerate.
1732 * Makefile.am: Run "make dep-am"
1733 * Makefile.in: Regenerate.
1734 * po/SRC-POTFILES.in: Regenerate.
1735
1736 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
1737
1738 * dwarf2.c (struct funcinfo): Move up.
1739 (lookup_address_in_function_table): New argument function_ptr.
1740 Set it.
1741 (lookup_address_in_line_table): New argument function. If function
1742 is non-NULL, use it to handle ``addr'' before the first line note of
1743 the function.
1744 (comp_unit_find_nearest_line): Update and swap calls to
1745 lookup_address_in_function_table and lookup_address_in_line_table.
1746 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
1747 N_SLINE encountered if we see an N_FUN before any N_SLINE.
1748
1749 2002-03-20 Tom Rix <trix@redhat.com>
1750
1751 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
1752 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
1753 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
1754
1755 2002-03-19 Tom Rix <trix@redhat.com>
1756
1757 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
1758 dynamic objects in archives.
1759
1760 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
1761
1762 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
1763 STT_NOTYPE symbols to STT_OBJECT.
1764
1765 2002-03-18 Jan Hubicka <jh@suse.cz>
1766
1767 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
1768
1769 2002-03-18 Tom Rix <trix@redhat.com>
1770
1771 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
1772 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
1773 * coff-rs6000 (do_pad) : New function for archive padding.
1774 (do_copy) : New function for object file copying in archives.
1775 (do_shared_object_padding) : New function for padding shared
1776 objects to their text section alignment in archives.
1777 (bfd_xcoff_ar_achive_set_magic) : Stub.
1778 (xcoff_write_armap_big) : Use do_copy and do_pad.
1779 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
1780 do_copy and do_pad.
1781 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
1782 bfd_xcoff_magic_number.
1783 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
1784 fop.
1785 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
1786 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
1787 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
1788 * rs6000-core.c : Update copyright date.
1789 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
1790 csectpp.
1791 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
1792 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
1793 (coff_set_flags) : Use bfd_xcoff_magic_number.
1794 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
1795 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
1796 * Makefile.am : Same.
1797 * config.bfd : Same.
1798 * targets.c : Same.
1799 * configure : Regnerate.
1800 * Makefile.in : Same.
1801 * bfd-in2.h : Same.
1802
1803 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
1804
1805 * po/fr.po: Updated version.
1806
1807 2002-03-18 Alan Modra <amodra@bigpond.net.au>
1808
1809 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
1810 * libbfd.h: Regenerate.
1811 * archive.c (coff_write_armap): Pass on failures from
1812 bfd_write_bigendian_4byte_int.
1813
1814 2002-03-14 H.J. Lu <hjl@gnu.org>
1815
1816 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
1817 error to bfd_error_nonrepresentable_section for reinit_array
1818 section in DSO.
1819
1820 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
1821
1822 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
1823 OR it in rather than replacing previously selected flags.
1824
1825 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
1826 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
1827
1828 2002-03-14 Alan Modra <amodra@bigpond.net.au>
1829
1830 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
1831 (N): Use the above.
1832 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
1833 ensure reloc size matches before calling elf_link_input_bfd.
1834 Add an assert to check reloc size when counting output relocs.
1835
1836 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
1837
1838 * mmo.c (mmo_get_loc): Return NULL rather than false.
1839
1840 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
1841
1842 * po/fr.po: Updated version.
1843
1844 2002-03-13 Alan Modra <amodra@bigpond.net.au>
1845
1846 * archures.c (bfd_default_compatible): Test bits_per_word.
1847 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
1848 bfd_default_compatible.
1849 * cpu-i370.c (i370_compatible): Likewise.
1850 * cpu-sparc.c (sparc_compatible): Likewise.
1851 * cpu-h8300.c (compatible): Test in->arch == out->arch.
1852
1853 * elflink.h: Formatting fixes.
1854 (elf_link_output_extsym): Merge undefined and undef weak cases.
1855
1856 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
1857 when word size of input matches output word size.
1858
1859 2002-03-12 Andreas Jaeger <aj@suse.de>
1860
1861 * cpu-i386.c (i386_compatible): New. Use it instead of
1862 bfd_default_compatible.
1863
1864 2002-03-07 H.J. Lu (hjl@gnu.org)
1865
1866 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
1867 as the type for bfd_reloc_val.
1868
1869 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
1870
1871 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
1872 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
1873 (elf_hppa_final_link_relocate): Correct relocations for indirect
1874 references to local data through the DLT. Fix .opd creation for
1875 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
1876 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
1877 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
1878 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
1879 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
1880 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
1881 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
1882
1883 2002-03-05 Jakub Jelinek <jakub@redhat.com>
1884
1885 * merge.c (_bfd_merge_sections): Don't segfault if there
1886 is nothing to merge due to GC.
1887
1888 2002-03-05 Alan Modra <amodra@bigpond.net.au>
1889
1890 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
1891 symbols that have been forced local.
1892
1893 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
1894 to output forced local syms for non-shared link.
1895 (elf_link_output_extsym): Tweak condition for calling backend
1896 adjust_dynamic_symbol so that previous behaviour is kept.
1897 Whitespace changes throughout file.
1898
1899 2002-03-04 H.J. Lu <hjl@gnu.org>
1900
1901 * elf.c (bfd_section_from_shdr): Handle special sections,
1902 .init_array, .fini_array and .preinit_array.
1903 (elf_fake_sections): Likewise.
1904
1905 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
1906 DT entry only if the section is in output for .init_array,
1907 .fini_array and .preinit_array. Complain about .preinit_array
1908 section in DSO.
1909 (elf_bfd_final_link): Warn zero size for .init_array,
1910 .fini_array and .preinit_array sections.
1911
1912 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
1913 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
1914 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
1915 .preinit_array.
1916
1917 2002-03-04 Alan Modra <amodra@bigpond.net.au>
1918
1919 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
1920 * configure: Regenerate.
1921
1922 2002-03-02 Tom Rix <trix@redhat.com>
1923
1924 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
1925 symbolic equiv.
1926 * coff-rs6000.c (xcoff_howto_table): Same.
1927
1928 2002-03-01 David Mosberger <davidm@hpl.hp.com>
1929
1930 * elflink.h (size_dynamic_sections): If section named
1931 ".preinit_array" exists, create DT_PREINIT_ARRAY and
1932 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
1933 ".init_array" and ".fini_array".
1934 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
1935 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
1936 DT_FINI_ARRAY.
1937
1938 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
1939
1940 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
1941 dynsyms.
1942
1943 2002-02-25 Alan Modra <amodra@bigpond.net.au>
1944
1945 * elf64-hppa.h: Update copyright date.
1946
1947 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
1948 (ppc64_elf_relocate_section): Don't generate power4 style branch
1949 hints for *_BRTAKEN and *_BRNTAKEN relocs.
1950
1951 2002-02-22 Jakub Jelinek <jakub@redhat.com>
1952
1953 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
1954 last patch.
1955 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1956
1957 2002-02-21 Andreas Jaeger <aj@suse.de>
1958
1959 * elf64-x86-64.c: Major rework that introduces all recent changes
1960 to the x86-64 backend. Get a closer match to elf32-i386.
1961 (struct elf64_x86_64_dyn_relocs): Rename from
1962 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
1963 all users.
1964 (struct elf64_x86_64_link_hash_table): Add short cuts to some
1965 sections.
1966 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
1967 remove casts, initialize new hash members.
1968 (create_got_section): New.
1969 (elf64_x86_64_create_dynamic_sections): New.
1970 (elf64_x86_64_copy_indirect_symbol): New.
1971 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
1972 relocs, .got or .relgot here but do it in allocate_dynrelocs.
1973 Reference count possible .plt and .got entries. Don't test input
1974 section SEC_READONLY here to try to avoid copy relocs, and keep
1975 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
1976 DF_TEXTREL here. Delay setting of variables until needed. Cache
1977 pointer to "sreloc" section in elf_section_data. Tweak condition
1978 under which .got created. Report files with bad relocation
1979 section names.
1980 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1981 Reference count possible .plt entries. Don't deallocate .got and
1982 .relgot space here.
1983 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
1984 do copy reloc processing for weakdefs. Remove redundant casts and
1985 aborts. Delay setting of vars until needed. Move creation of
1986 dynamic symbols and allocation of .plt and .rela.plt to
1987 allocate_dynrelocs. Replace BFD_ASSERT with abort.
1988 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
1989 (allocate_dynrelocs): New.
1990 (readonly_dynrelocs): New.
1991 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
1992 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
1993 Zero out the dynamic allocated content space.
1994 (elf64_x86_64_discard_copies): Removed.
1995 (elf64_x86_64_relocate_section): Make use of dynamic section
1996 short-cuts. Localise vars, and delay setting. Better error
1997 reporting, replace BFD_ASSERT with abort. Check
1998 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
1999 regular object file and tread the weak definition as the normal
2000 one. Don't discard relocs for undefweak or undefined symbols and
2001 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
2002 relocs.
2003 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
2004 symbols that have been forced local. Use same test to decide if
2005 we can use a relative reloc for got as relocate_section. Expand
2006 SHN_UNDEF comment. Move expressions out of function calls.
2007 Replace BFD_ASSERT with abort.
2008 (bfd_elf64_bfd_final_link): Removed.
2009 (elf_backend_copy_indirect_symbol): Define.
2010
2011 2002-02-20 Tom Rix <trix@redhat.com>
2012
2013 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
2014 (_bfd_xcoff_reloc_type_lookup): Use it.
2015 * coff64-rs6000.c (xcoff64_howto_table): Same.
2016 (xcoff64_reloc_type_lookup): Same.
2017
2018 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
2019
2020 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
2021 little endian.
2022
2023 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
2024
2025 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
2026 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
2027 * bfd-in2.h: Regenerate.
2028 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
2029 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
2030 with "s390:64-bit".
2031 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
2032 (elf_s390_reloc_type_lookup): Likewise.
2033 (elf_s390_check_relocs): Likewise.
2034 (elf_s390_gc_sweep_hook): Likewise.
2035 (elf_s390_relocate_section): Likewise.
2036 (elf_s390_object_p): Use renamed architecture define.
2037 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
2038
2039 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
2040
2041 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
2042
2043 2002-02-19 Jakub Jelinek <jakub@redhat.com>
2044
2045 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
2046 absptr -> pcrel optimization for shared libs.
2047 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
2048 library cannot be converted to pcrel.
2049 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
2050 relative.
2051 * elf32-i386.c (elf_i386_relocate_section): If
2052 _bfd_elf_section_offset returned -2, skip, but make sure the
2053 relocation is installed.
2054 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
2055 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2056 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2057 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2058 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2059 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2060 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2061 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2062 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2063 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2064 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2065 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2066 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2067 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2068 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
2069 _bfd_elf_section_offset returning -2 the same way as -1.
2070 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
2071 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
2072 and BFD_ASSERT.
2073 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
2074
2075 2002-02-18 Tom Rix <trix@redhat.com>
2076
2077 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
2078 (bfd_xcoff_size_dynamic_sections): Same.
2079 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
2080 (bfd_xcoff_size_dynamic_sections): Same.
2081 * coff-rs6000.c (xcoff_generate_rtinit): Same.
2082 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
2083 * libxcoff.h (struct xcoff_backend_data_rec): Same.
2084 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
2085 * bfd-in2.h: Regenerate.
2086
2087 2002-02-18 Alan Modra <amodra@bigpond.net.au>
2088
2089 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
2090 (struct ppc_link_hash_table): Add sfpr.
2091 (ppc64_elf_link_hash_table_create): Init it.
2092 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
2093 .glink out to..
2094 (create_linkage_sections): ..here. Make .sfpr too.
2095 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
2096 dynobj early.
2097 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
2098 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
2099 ._restf* functions, and create as needed.
2100 (func_desc_adjust): Only force_local for shared libs.
2101
2102 2002-02-18 David O'Brien <obrien@FreeBSD.org>
2103
2104 * configure.in: Bump version number post 2.12 branching.
2105 * configure: Regenerate.
2106
2107 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
2108
2109 * mmo.c: Correct and improve comments.
2110 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
2111 zero-pad. Use input to fill up non-empty bfd buffer.
2112 (mmo_flush_chunk): New function.
2113 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
2114 changed. Don't emit location specifier if VMA is same as
2115 *LAST_VMAP after omitting leading zero contents. Call
2116 mmo_flush_chunk before emitting location specifier.
2117 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
2118 with mmo_write_loc_chunk calls.
2119 (mmo_internal_write_section): Call mmo_flush_chunk after
2120 mmo_write_chunk.
2121 (mmo_write_symbols_and_terminator): Move :Main to first position
2122 in symbol array. Add faked one if it does not exist if there are
2123 other symbols. Don't add it if there are no symbols at all. Move
2124 out test for value of :Main from symbol loop. Rename table
2125 fakemain to maintable and variable mainsym to fakemain.
2126
2127 2002-02-15 Richard Henderson <rth@redhat.com>
2128
2129 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
2130 section with no got matches any got. Simplify error generaion.
2131
2132 2002-02-15 Alan Modra <amodra@bigpond.net.au>
2133
2134 Support arbitrary length fill patterns.
2135 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
2136 (_bfd_default_link_order): Remove bfd_fill_link_order code.
2137 Call default_data_link_order.
2138 (default_fill_link_order): Delete.
2139 (default_data_link_order): New function.
2140 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
2141 of bfd_fill_link_order with bfd_data_link_order.
2142 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
2143 * elf64-mips.c (mips_elf64_final_link): Likewise.
2144
2145 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
2146 Correct value returned in "end" for "0x<non-hex>".
2147
2148 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
2149
2150 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
2151 (scan): Test against 'mach' field in info structure.
2152
2153 2002-02-14 Alan Modra <amodra@bigpond.net.au>
2154
2155 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
2156
2157 2002-02-14 Matt Fredette <fredette@netbsd.org>
2158
2159 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
2160 EF_M68000.
2161
2162 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
2163
2164 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
2165 non-zero physical addresses when adjusting the LMAs of new
2166 sections.
2167
2168 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
2169
2170 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
2171 from _bfd_elf_hppa_gen_reloc_type.
2172 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
2173 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
2174 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
2175 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
2176
2177 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
2178
2179 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
2180 loading its contents if there's nothing to do in it.
2181
2182 2002-02-12 Alan Modra <amodra@bigpond.net.au>
2183
2184 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
2185 64k boundary.
2186
2187 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
2188 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
2189 (ppc64_elf_finish_dynamic_sections): Set values for them.
2190
2191 2002-02-11 Michael Snyder <msnyder@redhat.com>
2192
2193 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
2194 * elf.c (elfcore_grok_pstatus): Add prototype.
2195 (elfcore_grok_lwpstatus): Add prototype.
2196 (elfcore_write_lwpstatus): New function.
2197 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
2198
2199 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
2200
2201 * elf32-sh.c: Added missing prototypes.
2202 * elf32-sh64.c: Likewise.
2203 (sh_elf_align_loads): Mark unused args as such.
2204 * elf64-sh64.c: Added missing prototypes.
2205 (struct elf_sh64_link_hash_entry): Fix typo.
2206 (sh_elf64_relocate_section): Fix info argument passed to
2207 _bfd_elf_section_offset.
2208
2209 2002-02-11 Alan Modra <amodra@bigpond.net.au>
2210
2211 * Makefile.am: "make dep-am".
2212 * Makefile.in: Regenerate.
2213 * aclocal.m4: Regenerate.
2214 * config.in: Regenerate.
2215 * configure: Regenerate.
2216
2217 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
2218
2219 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
2220 variable warnings.
2221 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
2222 comparison warning.
2223 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
2224 cast warnings for the common case.
2225
2226 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
2227
2228 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
2229 vectors.
2230 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
2231 vectors.
2232
2233 2002-02-09 Richard Henderson <rth@redhat.com>
2234
2235 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
2236 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
2237 (elf64_alpha_relocate_section): Likewise.
2238 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
2239 * bfd-in2.h, libbfd.h: Rebuild.
2240
2241 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
2242
2243 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
2244 that base-plus-offset reloc accounting is consistent.
2245 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
2246 up to date for undefined symbols.
2247
2248 2002-02-08 Eric Christopher <echristo@redhat.com>
2249
2250 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2251
2252 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
2253 sections for the O32 ABI.
2254
2255 2002-02-08 Chris Demetriou <cgd@broadcom.com>
2256
2257 * elf32-arm.h: Fix formatting of _("...").
2258 * elf32-d10v.c: Likewise.
2259 * elf32-m68k.c: Likewise.
2260 * elf32-mips.c: Likewise.
2261
2262 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
2263
2264 * coff-or32.c: Fix compile time warning messages.
2265
2266 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
2267
2268 Contribute sh64-elf.
2269 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
2270 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
2271 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
2272 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
2273 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
2274 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
2275 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
2276 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
2277 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
2278 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
2279 New relocs.
2280 * libbfd.h, bfd-in2.h: Rebuilt.
2281 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
2282 (sh_reloc_map): Map them.
2283 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
2284 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
2285 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
2286 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
2287 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
2288 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
2289 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
2290 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
2291 datalabel_got_offset.
2292 (sh_elf_link_hash_newfunc): Initialize it.
2293 (sh_elf_relocate_section): Augment the scope of
2294 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
2295 GOT and GOTOFF handling to new SHmedia relocation types. Support
2296 GOT_BIAS.
2297 (sh_elf_check_relocs): Likewise.
2298 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
2299 PLT entries using movi_shori_putval. Support GOT_BIAS.
2300 (sh_elf_finish_dynamic_sections): Likewise.
2301 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
2302 relocation, it's now done by the caller.
2303 (GOT_BIAS): New.
2304 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
2305 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
2306 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
2307 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
2308 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
2309 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
2310 sh64_elf64_hash_table): New.
2311 (sh_elf64_howto_table): Introduce new relocs.
2312 (sh_elf64_info_to_howto): Accept new PIC relocs.
2313 (sh_elf64_relocate_section): Augment the scope of
2314 seen_stt_datalabel. Support new PIC relocs.
2315 (sh_elf64_check_relocs): Support new PIC relocs.
2316 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
2317 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
2318 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
2319 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
2320 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
2321 movi_shori_putval, movi_3shori_putval,
2322 sh64_elf64_create_dynamic_sections,
2323 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
2324 sh64_elf64_size_dynamic_sections,
2325 sh64_elf64_finish_dynamic_symbol,
2326 sh64_elf64_finish_dynamic_sections): New.
2327 (elf_backend_create_dynamic-sections,
2328 bfd_elf64_bfd_link_hash_table_create,
2329 elf_backend_adjust_dynamic_symbol,
2330 elf_backend_size_dynamic_sections,
2331 elf_backend_finish_dynamic_symbol,
2332 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
2333 elf_backend_plt_readonly, elf_backend_want_plt_sym,
2334 elf_backend_got_header_size, elf_backend_plt_header_size):
2335 Define.
2336 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
2337 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
2338 match official numbers and names; moved unmaching ones to the
2339 range 0xf2-0xff.
2340 * elf32-sh64.c, elf64-sh64.c: Likewise.
2341 2001-03-12 DJ Delorie <dj@redhat.com>
2342 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
2343 sections.
2344 2001-03-12 DJ Delorie <dj@redhat.com>
2345 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
2346 be aligned.
2347 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
2348 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
2349 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
2350 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
2351 .cranges section with SEC_SORT_ENTRIES set.
2352 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
2353 incoming sorted .cranges section.
2354 (sh64_bfd_elf_copy_private_section_data): New.
2355 (sh64_elf_final_write_processing): Only sort .cranges and modify
2356 start address if called by linker.
2357 2001-01-08 Ben Elliston <bje@redhat.com>
2358 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
2359 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
2360 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
2361 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
2362 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
2363 line. Add comments before all entries.
2364 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
2365 comment.
2366 (sh_elf64_reloc): Correct head comment.
2367 (sh_elf64_relocate_section): Correct spacing.
2368 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
2369 instead call reloc_dangerous callback.
2370 <case R_SH_SHMEDIA_CODE>: New case.
2371 (sh_elf64_gc_mark_hook): Correct spacing.
2372 (sh_elf64_check_relocs): Ditto.
2373 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
2374 New case.
2375 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
2376 functions.
2377 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
2378 clarify describing comment. Add comments before all entries.
2379 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
2380 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
2381 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
2382 Sort .cranges section in final link. Prepare to set bit 0 on
2383 entry address.
2384 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
2385 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
2386 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
2387 .cranges section.
2388 (sh64_backend_section_from_shdr): New, to recognize
2389 SHT_SH5_CR_SORTED on incoming .cranges section.
2390 (elf_backend_section_from_shdr): Define.
2391 (sh64_elf_final_write_processing): Sort outgoing .cranges
2392 section. (New, temporarily disabled:) Set bit 0 on entry address
2393 according to ISA type.
2394 (sh64_find_section_for_address): New.
2395 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
2396 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
2397 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
2398 bfd_malloc, not xmalloc.
2399 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
2400 global.
2401 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
2402 temporarily disabled) setting bit 0 on entry address.
2403 (elf_backend_final_write_processing): Define.
2404 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
2405 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
2406 be a proper relocation for PTA and PTB rather than a marker.
2407 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
2408 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
2409 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
2410 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
2411 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
2412 Zero src_mask.
2413 * elf64-sh64.c: Ditto.
2414 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
2415 * elf32-sh64.c: Include opcodes/sh64-opc.h
2416 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
2417 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
2418 parameters. No unused parameters. Caller changed.
2419 <case R_SH_PT_16>: New case.
2420 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
2421 * Makefile.in: Regenerate.
2422 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
2423 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
2424 all code sections.
2425 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
2426 (sh64_elf_merge_private_data): Ditto.
2427 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
2428 to access stored section flags.
2429 (sh64_elf_final_write_processing): Return immediately unless
2430 called by linker. Use sh64_elf_section_data (cranges) to get size
2431 of linker-generated cranges entries.
2432 (sh64_elf_copy_private_data): Add missing "return true".
2433 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
2434 (sh_elf64_merge_private_data): Ditto.
2435 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
2436 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
2437 elf64-sh64.c:sh64_elf_fake_sections.
2438 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
2439 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
2440 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
2441 (sh64_elf_final_write_processing): New.
2442 (elf_backend_final_write_processing): Define.
2443 (sh64_elf_fake_sections): Get header flags from tdata field.
2444 (sh64_elf_copy_private_data): Do not call
2445 sh64_elf_copy_private_data_internal, just copy e_flags field.
2446 (sh64_elf_merge_private_data): Do not call
2447 sh64_elf_copy_private_data_internal.
2448 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
2449 Remove EF_SH64_ABI64, let ELF size make difference.
2450 Remove SH64-specific BFD section flag.
2451 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
2452 containing SHmedia through elf_section_data (asect)->tdata
2453 non-zero, not using a BFD section flag.
2454 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
2455 (sh64_elf_merge_private_data): Similar.
2456 (elf_backend_section_flags): Don't define.
2457 (sh64_elf_backend_section_flags): Delete.
2458 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
2459 not EF_SH64_ABI64.
2460 (sh_elf64_merge_private_data): Similar.
2461 * section.c (Section flags definitions): Don't define
2462 SEC_SH_ISA_SHMEDIA.
2463 (bfd-in2.h): Regenerate.
2464 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
2465 Make DataLabel references work with partial linking.
2466 * elf32-sh64.c: Fix formatting.
2467 (sh64_elf_link_output_symbol_hook): New.
2468 (elf_backend_link_output_symbol_hook): Define to
2469 sh64_elf_link_output_symbol_hook.
2470 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
2471 undefined if partial linking. Adjust sanity check.
2472 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
2473 (elf_backend_link_output_symbol_hook): Define to
2474 sh64_elf64_link_output_symbol_hook.
2475 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
2476 undefined if partial linking. Adjust sanity check.
2477 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
2478 Implement semantics for inter-file DataLabel references.
2479 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
2480 (sh64_elf64_add_symbol_hook): New.
2481 (sh_elf64_relocate_section): If passing an indirect symbol with
2482 st_type STT_DATALABEL on the way to a symbol with st_other
2483 STO_SH5_ISA32, do not bitor 1 to the relocation.
2484 (elf_backend_add_symbol_hook): Define to
2485 sh64_elf64_add_symbol_hook.
2486 * elf64-sh32.c: Tweak comments.
2487 (DATALABEL_SUFFIX): Define.
2488 (sh64_elf_add_symbol_hook): New.
2489 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
2490 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
2491 symbol with st_type STT_DATALABEL on the way to a symbol with
2492 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
2493 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
2494 Pass through STT_DATALABEL.
2495 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
2496 (elf_backend_get_symbol_type): Define.
2497 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
2498 (elf_backend_get_symbol_type): Define.
2499 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
2500 * elf32-sh64.c: Tweak comments.
2501 (sh64_elf_copy_private_data_internal): Add prototype.
2502 (bfd_elf32_bfd_set_private_flags): Define.
2503 (sh64_elf_copy_private_data_internal): Compare machine name, not
2504 textual BFD target name, to check whether to copy section flag
2505 SHF_SH5_ISA32.
2506 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
2507 Tweak section-contents-type-mismatch message.
2508 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
2509 Validize reloc-types.
2510 * elf64-sh64.c: New file.
2511 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
2512 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
2513 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
2514 Regenerate dependencies.
2515 * Makefile.in: Regenerate.
2516 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
2517 bfd_elf64_sh64l_vec.
2518 * configure.in: Handle bfd_elf64_sh64_vec and
2519 bfd_elf64_sh64l_vec.
2520 * configure: Regenerate.
2521 * po/POTFILES.in: Regenerate.
2522 * po/bfd.pot: Regenerate.
2523 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
2524 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
2525 anything else but EF_SH64 and EF_SH64_ABI64.
2526 (sh64_elf_merge_private_data): Emit error for anything else but
2527 EF_SH64 and EF_SH64_ABI64.
2528 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
2529 from targ_selvecs.
2530 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
2531 bfd_elf32_sh64l_vec as a temporary measure.
2532 * configure: Regenerate.
2533 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
2534 * cpu-sh.c (arch_info_struct): Include sh5 item
2535 unconditionalized.
2536 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
2537 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
2538 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
2539 * elf32-sh64.c: Tweak comments.
2540 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
2541 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
2542 (sh64_elf_copy_private_data_internal): Wrap long line.
2543 (sh64_elf_merge_private_data): Rewrite to allow objects from
2544 SH64 subsets to be linked together.
2545 (INCLUDE_SHMEDIA): Define.
2546 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
2547 Parenthesize plus-expression inside or-expression.
2548 <global symbol>: Ditto.
2549 (sh_elf_set_mach_from_flags): Remove code refusing
2550 deleted EF_SH64_32BIT_ABI flag.
2551 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
2552 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
2553 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
2554 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
2555 (sh_elf_relocate_section) <local symbol>: Or 1 in
2556 calculation of relocation if sym->st_other & STO_SH5_ISA32.
2557 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
2558 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
2559 relocation.
2560 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
2561 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
2562 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
2563 Regenerate dependencies.
2564 * Makefile.in: Regenerate.
2565 * archures.c: Add bfd_mach_sh5.
2566 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
2567 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
2568 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
2569 * configure: Regenerate.
2570 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
2571 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
2572 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
2573 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
2574 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
2575 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
2576 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
2577 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
2578 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
2579 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
2580 in item for SH5.
2581 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
2582 for SHmedia relocs.
2583 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
2584 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
2585 shmedia_prepare_reloc, goto final_link_relocate if it returns
2586 non-zero, else fail as before.
2587 (sh_elf_set_mach_from_flags): Provide function only if not defined
2588 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
2589 (sh_elf_set_private_flags): Provide function only if not defined
2590 as a macro.
2591 (sh_elf_copy_private_data): Similar.
2592 (sh_elf_merge_private_data): Similar.
2593 * section.c (SEC_SH_ISA_SHMEDIA): New.
2594 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
2595 * elf32-sh64.c: New file.
2596 * libbfd.h: Regenerate.
2597 * bfd-in2.h: Regenerate.
2598 * po/POTFILES.in: Regenerate.
2599 * po/bfd.pot: Regenerate.
2600 * bfd-in2.h: Regenerate.
2601 * libbfd.h: Regenerate.
2602
2603 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
2604
2605 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
2606 been included, not drag it in.
2607 * bfd-in2.h: Regenerate.
2608
2609 2002-02-06 H.J. Lu (hjl@gnu.org)
2610
2611 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
2612 the mach and ISA fields if necessary.
2613
2614 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
2615
2616 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
2617 ARM architecture when an F_ARM_5 flag is detected, since we cannot
2618 be sure exactly which architecture this represents.
2619
2620 2002-02-05 Nick Clifton <nickc@redhat.com>
2621
2622 * po/tr.po: Updated translation.
2623
2624 2002-02-05 Alan Modra <amodra@bigpond.net.au>
2625
2626 From Jimi X <jimix@watson.ibm.com>
2627 * archures (bfd_mach_ppc64): Define.
2628 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
2629 (bfd_powerpc_arch): Define.
2630 * bfd-in2.h: Regenerate.
2631 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
2632 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
2633 (bfd_powerpc_archs): Add default powerpc64 arch.
2634
2635 2002-02-05 Alan Modra <amodra@bigpond.net.au>
2636
2637 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
2638 against section syms in readonly sections. Don't do the global
2639 sym check if we find one.
2640 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
2641 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
2642 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
2643 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
2644 (elf_s390_grok_prstatus): Add missing prototype.
2645
2646 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
2647
2648 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
2649 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
2650 Call bfd_get_section_by_name only once. Initialize
2651 bpodata->n_bpo_relocs_this_section.
2652 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
2653 referring to DSOs.
2654 (bpo_reloc_request_sort_fn): Don't use difference of values as
2655 return-value.
2656
2657 2002-02-02 David O'Brien <obrien@FreeBSD>
2658
2659 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
2660 version 4.5 and later the same as 5-CURRENT.
2661 * configure: Re-generate.
2662
2663 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
2664
2665 * config.bfd (hppa*-*-netbsd*): New target.
2666
2667 2002-01-31 Philipp Thomas <pthomas@suse.de>
2668
2669 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
2670 to front of message. Unify messages with elf32-arm.h. Use
2671 commas where neccessary.
2672 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
2673 ERROR in messages. Unify messages with coff-arm.c. Correct
2674 VFP/FPA error message.
2675 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
2676 APCS-32 for translation.
2677
2678 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
2679
2680 Perform on-demand global register allocation from
2681 R_MMIX_BASE_PLUS_OFFSET relocs.
2682 * elf64-mmix.c (struct bpo_reloc_section_info, struct
2683 bpo_reloc_request, struct bpo_greg_section_info): New.
2684 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
2685 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
2686 _bfd_mmix_check_all_relocs,
2687 _bfd_mmix_prepare_linker_allocated_gregs,
2688 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
2689 (elf_mmix_howto_table): Correct src_mask for most relocs.
2690 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
2691 case.
2692 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
2693 case. Fix typo in comment. New label do_mmix_reloc.
2694 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
2695 store first object file with a base-plus-offset reloc. Call
2696 mmix_elf_check_common_relocs for the part common with mmo.
2697 (mmix_elf_final_link): Write out linker-allocated register
2698 contents section.
2699 (elf_backend_gc_sweep_hook): Define.
2700 (bfd_elf64_bfd_relax_section): Define.
2701
2702 * mmo.c: Don't include <ctype.h>
2703 (mmo_init): Correct init-once logic.
2704
2705 2002-02-01 Tom Rix <trix@redhat.com>
2706
2707 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
2708
2709 2002-02-01 Alan Modra <amodra@bigpond.net.au>
2710
2711 * Makefile.am: Run "make dep-am"
2712 * Makefile.in: Regenerate.
2713
2714 2002-01-31 David O'Brien <obrien@FreeBSD>
2715
2716 * configure.in: Recognize the differences in core files from FreeBSD
2717 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
2718 5-CURRENT.
2719 * configure: Regenerate.
2720
2721 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
2722
2723 * coff-or32.c: New file.
2724 * cpu-or32.c: New file.
2725 * elf32-or32.c: New file.
2726 * archures.c: Add support for or32.
2727 * targets.c: Add support for or32.
2728 * bfd-in2.h: Regenerate.
2729 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
2730 coff_write_object_contents): Add support for or32.
2731 * config.bfd: Add target.
2732 * configure.in: Add support for or32.
2733 * configure: Regenerate.
2734 * Makefile.am: Add support for or32.
2735 * Makefile.in: Regenerate.
2736 * po/SRC-POTFILES.in: Add or32 files.
2737 * po/bfd.pot: Regenerate.
2738
2739 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
2740 Don Lindsay <lindsayd@cisco.com>
2741
2742 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
2743 false' with a return of a bfd_reloc_ error code.
2744
2745 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
2746
2747 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
2748 unexport unreferenced symbols when --export-dynamic. Call
2749 _bfd_elf_strtab_delref when unexporting.
2750
2751 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
2752
2753 * bfd-in.h: Include <stdbool.h> if it is available.
2754 * bfd-in2.h: Regenerated.
2755
2756 2002-01-31 Alan Modra <amodra@bigpond.net.au>
2757
2758 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
2759 not go via the plt.
2760
2761 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
2762
2763 * archures.c: Tidy up formatting of embedded comments.
2764 * bfd.c: Tidy up formatting of embedded comments.
2765 * bfd-in.h: Fix formatting of comments.
2766 * reloc.c: Tidy up formatting of ordinary & embedded comments.
2767 * section.c: Tidy up formatting of embedded comments.
2768 * syms.c: Tidy up formatting of embedded comments.
2769 * targets.c: Tidy up formatting of embedded comments.
2770
2771 * bfd-in2.h: Regenerate.
2772
2773 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
2774
2775 * vms-tir.c (cmd_name): New function.
2776 (tir_cmd_name): New function.
2777 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
2778 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
2779 Fix formatting.
2780
2781 * peXXigen.c (pe_print_idata): Rearrange message to aid in
2782 translation.
2783 (pe_print_pdata): Rearrange message to aid in translation.
2784
2785 * libbfd.c (warn_deprecated): Rearrange error message to aid in
2786 translation.
2787
2788 * ihex.c (ihex_write_object_contents): Fix spelling typo.
2789
2790 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
2791
2792 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
2793 message to aid in translation.
2794
2795 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
2796 to aid in translation.
2797
2798 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
2799
2800 2002-01-30 Philipp Thomas <pthomas@suse.de>
2801
2802 * coff-arm.c, elf32-elf.h: Unify messages.
2803
2804 2002-01-30 Nick Clifton <nickc@redhat.com>
2805
2806 * po/sv.po: Updated translation.
2807
2808 2002-01-30 Philipp Thomas <pthomas@suse.de>
2809
2810 * dwarf2.c (read_abbrev): Use full section name in error message.
2811 (decode_line_info): Likewise.
2812
2813 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
2814 message.
2815
2816 2002-01-30 Alan Modra <amodra@bigpond.net.au>
2817
2818 * elf64-ppc.c (func_desc_adjust): Only provide missing function
2819 descriptor symbols for undefined function code syms. Clear
2820 ELF_LINK_NON_ELF so that they can stay weak.
2821
2822 2002-01-29 Chris Demetriou <cgd@broadcom.com>
2823 Mitch Lichtenberg <mpl@broadcom.com>
2824
2825 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
2826 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
2827 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
2828 generation.
2829 * bfd-in2.h: Regenerate.
2830
2831 2002-01-29 Chris Demetriou <cgd@broadcom.com>
2832
2833 * elf32-mips.c: Add additional comments about HI16 relocation
2834 processing.
2835 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
2836 pc-relative relocations. (Reverts change made on 2001-10-31.)
2837 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
2838 for pc-relative relocations.
2839 (mips_elf_calculate_relocation): Add a comment about a kludge
2840 in the R_MIPS_GNU_REL_HI16 handling.
2841 (_bfd_mips_elf_relocate_section): Implement that kludge;
2842 adjust pc-relative HI16 relocation for difference in HI16 and
2843 LO16 addresses, since it can't easily be done in
2844 mips_elf_calculate_relocation.
2845
2846 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
2847
2848 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
2849 relocations with PC32 relocations for undefined or weak symbols.
2850 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
2851 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
2852
2853 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
2854
2855 * elfcore.h (elf_core_file_p): Improve comment for last change.
2856
2857 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
2858
2859 * configure: Regenerated.
2860
2861 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
2862
2863 * elfcore.h (elf_core_file_p): Set the machine architecture
2864 before processing the program headers.
2865
2866 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
2867
2868 * configure.in <64-bit configuration>: If using gcc, check and
2869 emit error for egcs-1.1.2.
2870 * configure: Regenerate.
2871
2872 2002-01-26 Egor Duda <deo@logos-m.ru>
2873
2874 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
2875 as possible to avoid stack corruption.
2876
2877 2002-01-26 Richard Henderson <rth@redhat.com>
2878
2879 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
2880 for non-allocated sections.
2881
2882 2002-01-25 Mark Kettenis <kettenis@gnu.org>
2883
2884 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
2885 prstat.pr_reg even if it is a struct.
2886
2887 2002-01-25 Steve Ellcey <sje@cup.hp.com>
2888
2889 * bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
2890
2891 2002-01-25 Philipp Thomas <pthomas@suse.de>
2892
2893 * coffgen.c (coff_print_symbol): Don't mark info message
2894 for translation.
2895
2896 2002-01-25 Nick Clifton <nickc@redhat.com>
2897
2898 * po/fr.po: Updated translation.
2899 * po/es.po: Updated translation.
2900
2901 2002-01-25 Philipp Thomas <pthomas@suse.de>
2902
2903 * coff-alpha.c (alpha_relocate_section): Unify warning message
2904 for GP relative relocations without GP defined.
2905 * coff-mips.c (mips_relocate_section): Likewise.
2906
2907 2002-01-25 Alan Modra <amodra@bigpond.net.au>
2908
2909 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
2910 unsigned overflow when new_offset < old_offset.
2911
2912 2002-01-24 Philipp Thomas <pthomas@suse.de>
2913
2914 * bfd.c (_bfd_abort): Fix typo.
2915
2916 2002-01-23 Richard Henderson <rth@redhat.com>
2917
2918 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
2919 plt entries for undefweak symbols.
2920
2921 2002-01-23 Steve Ellcey <sje@cup.hp.com>
2922
2923 * bfd/targets.c (bfd_elf32_ia64_hpux_big_vec): Add to
2924 DEFAULT_VECTOR.
2925 (bfd_elf64_ia64_hpux_big_vec): Ditto.
2926 (bfd_elf32_h8300_vec): Ditto.
2927
2928 2002-01-23 Alan Modra <amodra@bigpond.net.au>
2929
2930 * elf64-ppc.c: Remove stale part of ABI comment.
2931 (NO_OPD_RELOCS): Define.
2932 (ppc64_elf_check_relocs): Use it.
2933 (ppc64_elf_relocate_section): Here too.
2934 (build_one_stub): Don't point function syms at the stub. Instead,
2935 hijack plt.offset.
2936 (ppc64_elf_relocate_section): Check whether REL24 relocs should
2937 really go to the stub. Make all dynamic relocs in opd against
2938 locals.
2939 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
2940 plt.offset.
2941
2942 2002-01-22 Richard Henderson <rth@redhat.com>
2943
2944 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
2945
2946 2002-01-22 Alan Modra <amodra@bigpond.net.au>
2947
2948 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
2949 TOC_BASE_OFF adjustment.
2950
2951 * Makefile.am: Run "make dep-am".
2952 * Makefile.in: Regenerate.
2953 * po/SRC-POTFILES.in: Regenerate.
2954
2955 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
2956
2957 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
2958 host defines.
2959
2960 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
2961
2962 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
2963 Check for and emit error if sgot is NULL at this point.
2964
2965 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
2966
2967 * config.bfd (ia64*-*-netbsd*): New target.
2968
2969 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
2970
2971 * som.c (som_write_space_strings): Comment typo fix.
2972
2973 2002-01-21 Alan Modra <amodra@bigpond.net.au>
2974
2975 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
2976 is_func_descriptor fields.
2977 (link_hash_newfunc): Init them.
2978 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
2979 dot are candidates for plt entries. When processing .opd relocs,
2980 set function descriptor strings to point inside function code
2981 string, and set new ppc_link_hash_entry fields.
2982 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
2983 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
2984 function descriptors. It's now done in..
2985 (func_desc_adjust): New.
2986 (ppc64_elf_func_desc_adjust): New.
2987 (define elf_backend_always_size_sections): Define.
2988 (ppc64_elf_hide_symbol): New.
2989 (define elf_backend_hide_symbol): Define.
2990 (allocate_dynrelocs): Remove code looking up function descriptors
2991 as that has been done earlier.
2992 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
2993 table.
2994 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
2995 up function descriptor.
2996 (build_one_stub): Look up the function code sym. Check for
2997 invalid plt offsets.
2998 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
2999 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
3000
3001 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
3002 boolean param.
3003 (_bfd_elf_link_hash_hide_symbol): Likewise.
3004 * elflink.h (elf_link_add_object_symbols): Adjust call to
3005 elf_backend_hide_symbol.
3006 (elf_fix_symbol_flags): Likewise.
3007 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
3008 than bfd_alloc.
3009 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
3010 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
3011 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
3012 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
3013 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
3014 and adjust to suit.
3015 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
3016 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
3017 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
3018
3019 2002-01-18 Alan Modra <amodra@bigpond.net.au>
3020
3021 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
3022 dynamic function descriptor symbol, not the associated function
3023 symbol.
3024
3025 2002-01-17 Eric Christopher <echristo@redhat.com>
3026
3027 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
3028
3029 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
3030
3031 * po/bfd.pot: Regenerate.
3032 * po/fr.po: Regenerate.
3033
3034 2002-01-17 Alan Modra <amodra@bigpond.net.au>
3035
3036 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
3037 Remove "Elf_Internal_Shdr *" param.
3038 (_bfd_mips_elf_section_from_bfd_section): Ditto.
3039 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
3040 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
3041 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
3042 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
3043 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
3044 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
3045 function to override special sections. Remove hdr arg from
3046 backend call, and don't loop.
3047
3048 2002-01-16 Eric Christopher <echristo@redhat.com>
3049
3050 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
3051 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
3052 relocations requiring gp0 and gp.
3053
3054 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
3055
3056 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
3057 EF_ARM_VFP_FLOAT.
3058 (elf32_arm_print_private_bfd_data): Likewise.
3059
3060 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
3061
3062 * po/tr.po: Import new version.
3063
3064 2002-01-16 Alan Modra <amodra@bigpond.net.au>
3065
3066 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
3067 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
3068 (ORI_R0_R0_0): Correct.
3069
3070 2002-01-16 Alan Modra <amodra@bigpond.net.au>
3071
3072 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
3073 when plt_not_loaded.
3074 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
3075 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
3076 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
3077 (ppc64_elf_glink_code): Delete.
3078 (PPC64_ELF_GLINK_SIZE): Delete.
3079 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
3080 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
3081 ORI_R0_R0_0): Define.
3082 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
3083 (struct ppc_link_hash_table): Add sstub and plt_overflow.
3084 (ppc64_elf_link_hash_table_create): Init them.
3085 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
3086 Don't copy to shared lib.
3087 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
3088 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
3089 (allocate_dynrelocs <plt>): Don't change function sym here. Make
3090 room for .stub and .glink code.
3091 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
3092 DT_PPC64_GLINK.
3093 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
3094 bfd_elf64_bfd_final_link.
3095 (bfd_elf64_bfd_final_link): Don't define.
3096 (ppc64_elf_size_stubs): New.
3097 (build_plt_stub): New.
3098 (build_one_stub): New.
3099 (ppc64_elf_build_stubs): New.
3100 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
3101 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
3102 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
3103 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
3104 case output sections not separate. Adjust DT_RELASZ to not
3105 include plt relocs. Set reserved got entry. Set got and plt
3106 entry size.
3107 (elf_backend_got_header_size): Set to 8.
3108 * elf64-ppc.h: New file.
3109
3110 2002-01-16 Alan Modra <amodra@bigpond.net.au>
3111
3112 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
3113 sections, use bfd_section_list_remove.
3114 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
3115 * elflink.h (elf_link_add_object_symbols): When removing all
3116 sections, use bfd_section_list_clear.
3117
3118 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
3119
3120 * po/sv.po: New file: Swedish translation.
3121 * configure.in (ALL_LINGUAS): Add sv.
3122 * configure: Regenerate.
3123
3124 2002-01-15 Jakub Jelinek <jakub@redhat.com>
3125
3126 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
3127 * elf.c (merge_sections_remove_hook): New function.
3128 (_bfd_elf_merge_sections): Pass it as 3rd argument to
3129 _bfd_merge_sections.
3130 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
3131 * libbfd.h: Rebuilt.
3132 * merge.c (_bfd_merge_sections): Add remove_hook argument.
3133 Call remove_hook if a SEC_EXCLUDE section is encountered.
3134
3135 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
3136
3137 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
3138 (xstormy16_reloc_map): Initialise new field with correct howto
3139 table.
3140 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
3141 howto entry.
3142
3143 2002-01-10 Michael Snyder <msnyder@redhat.com>
3144
3145 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
3146 (elfcore_write_pstatus): Use long instead of pid_t;
3147 * elf-bfd.h: Change prototypes to use long instead of pid_t;
3148
3149 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
3150
3151 * elf.c: Update copyright years.
3152 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
3153 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
3154
3155 2002-01-08 Michael Snyder <msnyder@redhat.com>
3156
3157 Add capability to write corefile note sections, for gdb.
3158 * elf.c (elfcore_write_note): New function.
3159 (elfcore_write_prpsinfo): New function.
3160 (elfcore_write_prstatus): New function.
3161 (elfcore_write_pstatus): New function.
3162 (elfcore_write_prfpreg): New function.
3163 (elfcore_write_prxfpreg): New function.
3164 * elf-bfd.h: Add prototypes for above functions.
3165
3166 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
3167
3168 * elf.c (elf_fake_sections): Propagate errors from
3169 elf_backend_fake_section.
3170
3171 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
3172
3173 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
3174 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
3175 (elf32-sh-nbsd.lo): New rule.
3176 * Makefile.in: Regenerate.
3177 * config.bfd (sh*le-*-netbsdelf*): New target.
3178 (sh*-*-netbsdelf*): New target.
3179 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
3180 (bfd_elf32_shnbsd_vec): New vector.
3181 (bfd_elf32_shlnbsd_vec): New vector.
3182 * configure: Regenerate.
3183 * elf32-sh-nbsd.c: New file.
3184 * targets.c: Update copyright years.
3185 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
3186 bfd_elf32_shnbsd_vec.
3187
3188 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
3189
3190 * coff-rs6000.c (READ20): Use bfd_scan_vma.
3191
3192 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
3193
3194 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
3195 of a symbol in a section that will be deleted.
3196
3197 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
3198
3199 * po/es.po: New file: Spanish translation.
3200 * configure.in (ALL_LINGUAS): Add es.
3201 * configure: Regenerate.
3202
3203 2002-01-06 Steve Ellcey <sje@cup.hp.com>
3204
3205 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
3206 argument so we can handle HP-UX specially.
3207 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
3208 (elfNN_hpux_backend_section_from_bfd_section): New for support
3209 of SHN_IA_64_ANSI_COMMON.
3210 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
3211 (is_unwind_section_name): Add special HP-UX support.
3212 (elfNN_ia64_section_from_shdr): Add support for more sections.
3213 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
3214 add support for more sections.
3215 (elfNN_ia64_additional_program_headers): Modify
3216 is_unwind_section_name call.
3217 (elfNN_ia64_modify_segment_map): Remove assumption that there is
3218 only one unwind section in segment.
3219
3220 2002-01-06 Alan Modra <amodra@bigpond.net.au>
3221
3222 * syms.c (_bfd_generic_make_empty_symbol): New function.
3223 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
3224 _bfd_generic_make_empty_symbol.
3225 * libbfd.h: Regenerate.
3226 * bfd-in2.h: Regenerate.
3227 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
3228 (hppabsd_core_get_symtab_upper_bound): Don't define.
3229 (hppabsd_core_get_symtab): Likewise.
3230 (hppabsd_core_print_symbol): Likewise.
3231 (hppabsd_core_get_symbol_info): Likewise.
3232 (hppabsd_core_bfd_is_local_label_name): Likewise.
3233 (hppabsd_core_get_lineno): Likewise.
3234 (hppabsd_core_find_nearest_line): Likewise.
3235 (hppabsd_core_bfd_make_debug_symbol): Likewise.
3236 (hppabsd_core_read_minisymbols): Likewise.
3237 (hppabsd_core_minisymbol_to_symbol): Likewise.
3238 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
3239 Formatting fixes.
3240 * hpux-core.c: Similarly.
3241 * irix-core.c: Similarly.
3242 * osf-core.c: Similarly.
3243 * sco5-core.c: Similarly.
3244 * binary.c (binary_make_empty_symbol): Remove function, define as
3245 _bfd_generic_make_empty_symbol.
3246 * ihex.c (ihex_make_empty_symbol): Likewise.
3247 * mmo.c (mmo_make_empty_symbol): Likewise.
3248 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
3249 * srec.c (srec_make_empty_symbol): Likewise.
3250 * versados.c (versados_make_empty_symbol): Likewise.
3251 * vms.c (_bfd_vms_make_empty_symbol): Remove.
3252 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
3253 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
3254 rather than _bfd_vms_make_empty_symbol.
3255 * vms-misc.c (new_symbol): Likewise.
3256
3257 2002-01-05 Alan Modra <amodra@bigpond.net.au>
3258
3259 * section.c (bfd_section_init): Remove unnecessary initialisations.
3260 (bfd_section_list_clear): New function.
3261 (bfd_section_list_remove, bfd_section_list_insert): New macros.
3262 (_bfd_strip_section_from_output): Use them.
3263 * coffcode.h (coff_set_alignment_hook): Likewise.
3264 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
3265 * elf64-mips.c (mips_elf64_final_link): Likewise.
3266 * elf64-mmix.c (mmix_elf_final_link): Likewise.
3267 * sunos.c (sunos_add_dynamic_symbols): Likewise.
3268 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
3269 * bfd-in2.h: Regenerate.
3270
3271 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
3272 rather than doing our own section handling. Clean up after errors
3273 with bfd_release and bfd_section_list_clear. Handle unexpected
3274 flags.
3275 * aoutf1.h (sunos4_core_file_p): Likewise.
3276 * aix386-core.c (aix386_core_file_p): Likewise.
3277 * cisco-core.c (cisco_core_file_validate): Likewise.
3278 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
3279 * trad-core.c (trad_unix_core_file_p): Likewise.
3280
3281 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
3282 with bfd_release and bfd_section_list_clear.
3283 * hpux-core.c (hpux_core_core_file_p): Likewise.
3284 * irix-core.c (irix_core_core_file_p): Likewise.
3285 * lynx-core.c (lynx_core_file_p): Likewise.
3286 * osf-core.c (osf_core_core_file_p): Likewise.
3287 * rs6000-core.c (rs6000coff_core_p): Likewise.
3288 * sco5-core.c (sco5_core_file_p): Likewise.
3289
3290 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
3291 sign extension adjustments without conditionals.
3292
3293 2002-01-04 Jakub Jelinek <jakub@redhat.com>
3294
3295 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
3296 CIE at .eh_frame start is removed due to no FDEs referencing it.
3297
3298 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
3299
3300 * config.bfd (x86_64-*-netbsd*): New target.
3301 * configure.in (x86_64-*-netbsd*): Set COREFILE
3302 to netbsd-core.lo.
3303 * configure: Regenerated.
3304
3305 2002-01-03 Tom Rix <trix@redhat.com>
3306
3307 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
3308 for recent bfd_make_section_anyway change.
3309
3310 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
3311
3312 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
3313 R_ARM_THM_PC11 reloc.
3314
3315 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
3316
3317 * configure.in (LINGUAS): Add ja.
3318 * configure: Regenerate.
3319 * po/ja.po: Import from translation project's web site.
3320
3321 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
3322
3323 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
3324 messages to ease translation into other languages.
3325
3326 For older changes see ChangeLog-0001
3327 \f
3328 Local Variables:
3329 mode: change-log
3330 left-margin: 8
3331 fill-column: 74
3332 version-control: never
3333 End: