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