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