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