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